Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7512139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:46:30+00:00 2026-05-29T23:46:30+00:00

The Apache Qpid Java client API has an AMQConnection class that is used to

  • 0

The Apache Qpid Java client API has an AMQConnection class that is used to make a connection to a Qpid message broker. I’m using the single-String constructor (AMQConnection(String connection)). I have a utility method that creates the connection string first, which is then passed to the AMQConnection constructor.

The connection string is of the form amqp://<username>:<password>@<clientID>/?brokerlist='tcp://<hostname>:<port>'.

If the constructor is passed a connection string with incorrect syntax, it throws a URLSyntaxException.

I would like to move the connection string syntax check to the utility method (I’m of the opinion that it shouldn’t be able to return broken information), but I have not found any way of validating the connection string short of trying to set up a connection to the message broker. Is there any way of doing this, or do I just have to rely on the URLSyntaxException being thrown from the constructor?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:46:31+00:00Added an answer on May 29, 2026 at 11:46 pm

    Do you only want to check the URI for correct syntax? If so, simply create an instance of URI class:

    new URI("amqp://user:pwd@42/?brokerlist='tcp://example.com:80'")
    

    This throws an java.net.URISyntaxException when URI is not syntactically correct.

    If you need to check the URI for AMQ-specific options, you might have two have a look at AMQ source code and find a class that validates/parses this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've installed the M4 release of the Apache Qpid Java broker on a Windows
I have to consume rabbitmq-server with apache qpid java client (because I have to
Apache XMLBeans can be used to generate Java classes and interfaces from XML Schema
Using Apache's commons-httpclient for Java, what's the best way to add query parameters to
My Apache Tomcat Server is getting periodic updates from a Java based client Application,
Apache qpid does not has a direct support for sending Date type objects. I
Apache has something called VirtualHosts. You can configure it in that way that when
In Apache Derby using the embedded ij command client, what should be the statement
I'm running the qpid-bench tool that comes with Apache qpid against a couple different
Apache just fails to start with NO error message when we try to reboot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.