Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Purpose

Here are a list of commonly asked questions and answers. Click on the the bolded questions for the answer to unfold. If you have any questions which are not on this list, please email our qpid-user list.

...

Table of Contents
minLevel24

Getting Started

...

...

{toggle-cloak:id=whatisQpid}

What is Qpid ?

...

The java implementation of Qpid is a pure Java message broker that implements the AMQP protocol. Essentially, Qpid is a robust, performant middleware component that can handle your messaging traffic.

...

  • High performance header-based routing for messages
  • All features required by the JMS 1.1 specification. Qpid passes all tests in the Sun JMS compliance test suite
  • Transaction support
  • Persistence using the high performance Berkeley DB Java Edition. The persistence layer is also pluggable should an alternative implementation be required. The BDB store is available from the 3rd Party Libraries page
  • Pluggable security using SASL. Any Java SASL provider can be used
  • Management using JMX and a custom management console built using Eclipse RCP
  • Naturally, interoperability with other clients including the Qpid .NET, Python, Ruby and C++ implementations
Wiki Markup
{cloak}
Wiki Markup
{toggle-cloak:id=ConfigException}

...

Why am I getting a ConfigurationException at broker startup ?

...

InvocationTargetException

If you get a java.lang.reflect.InvocationTargetException on startup, wrapped as ConfigurationException like this:

...

No Format
<value>${passwordDir}/passwd</value>

Cannot locate configuration source null/virtualhosts.xml

If you get this message, wrapped inside a ConfigurationException then you've come across a known issue, see JIRA QPID-431

The work around is to use a qualified path as the parameter value for your -c option, rather than (as you migth be) starting the broker from your installed etc directory. Even going up one level and using a path relative to your £QPID_HOME directory would sort this e.g qpid-server -c ./etc/myconfig.xml

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=q4}

How do I run the Qpid broker ?

Wiki Markup
{cloak:id=q4}

The broker comes with a script for unix/linux/cygwin called qpid-server, which can be found in the bin directory of the installed package. This command can be executed without any paramters and will then use the default configuration file provided on install.

...

For more information on running the broker please see our Getting Started page.

Wiki Markup
{cloak}

...

How can I create a connection using a URL ?

...

Please see the Connection URL Format documentation.

Wiki Markup
{cloak}
Wiki Markup
{toggle-cloak:id=q6}

...

How do I represent a JMS Destination string with QPID ?

...

Queues

A queue can be created in QPID using the following URL format.

...

The topic subscription may only contain the letters A-Z and a-z and digits 0-9.

Wiki Markup
{composition-setup}{composition-setup}

cloak.memory.duration = 0

Wiki Markup
{cloak:id=hiddentillqpid-3isdone|visible=false}

The topic subscription is formed from a series of words that may only contain the letters A-Z and a-z and digits 0-9.
The topic subscription is formed from a series of words that may only contain the letters A-Z and a-z and digits 0-9.
The words are delimited by dots. Each dot represents a new level.

...

The topic currently does not support wild cards.

Wiki Markup
{cloak}
Wiki Markup
{cloak}
Wiki Markup
{toggle-cloak:id=q7}

...

How do I connect to the broker using JNDI ?

Wiki Markup
{cloak:id=q7}

see How to use JNDI

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=q8}

I'm using Spring and Weblogic - can you help me with the configuration for moving over to Qpid ?

...

Here is a donated Spring configuration file appContext.zip which shows the config for Qpid side by side with Weblogic. HtH !

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=q9}

How do I configure the logging level for Qpid ?

...

The system property

No Format
amqj.logging.level

...

The log level for the broker defaults to INFO if the env variable is not set, but you may find that your log4j properties affect this. Setting the property noted above should address this.

Wiki Markup
{cloak}

...

property noted above should address this.

How can I configure my application to use Qpid client logging?

...

...

{cloak:id=loggingslf4j}

If you don't already have a logging implementation in your classpath you should add slf4-log4j12-1.4.0.jar and log4j-1.2.12.jar.

Wiki Markup
{cloak}

...

How can I configure

...

the broker ?

The broker configuration is contained in the <installed-dir>/etc/config.xml file. You can copy and edit this file and then specify your own configuration file as a parameter to the startup script using the -c flag i.e. qpid-server -c <your_config_file's_path>

For more detailed information on configuration, please see Qpid Design - Configuration

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=q11}

How can I change the port the broker uses at runtime ?

...

...

{cloak:id=q11}

The broker defaults to use port 5672 at startup.

...

For more detailed information on configuration, please see Qpid Design - Configuration

Wiki Markup
{cloak}

...

see Qpid Design - Configuration

What command line options can I pass into the qpid-server script ?

...

...

{cloak:id=q12}

The following command line options are available:

Include Page
qpid:QpidBrokerCommandLineOptions
qpid:QpidBrokerCommandLineOptions
Wiki Markup
{cloak}

...

How do I authenticate with the broker ? What user id & password should I use ?

...

You should login as user guest with password guest

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=q14}

How do I create queues that will always be instantiated at broker startup ?

...

You can configure queues which will be created at broker startup by tailoring a copy of the virtualhosts.xml file provided in the installed qpid-version/etc directory.

...

You can then pass this amended config.xml into the broker at startup using the -c flag i.e.
qpid-server -c <path>/config.xml

Wiki Markup
{cloak}

...

-server -c <path>/config.xml

How do I create queues at runtime?

...

...

{cloak:id=runtimequeues}

Queues can be dynamically created at runtime by creating a consumer for them. After they have been created and bound (which happens automatically when a JMS Consumer is created) a publisher can send messages to them.

Wiki Markup
{cloak}

...

How do I tune the broker?

...

There are a number of tuning options available, please see the How to Tune M3 Java Broker Performance page for more information.

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=q16}

Where do undeliverable messages end up ?

...

At present, messages with an invalid routing key will be returned to the sender. If you register an exception listener for your publisher (easiest to do by making your publisher implement the ExceptionListener interface and coding the onException method) you'll see that you end up in onException in this case. You can expect to be catching a subclass of org.apache.qpid.AMQUndeliveredException.

Wiki Markup
{cloak}

...

.

Can I configure the name of the Qpid broker log file at runtime ?

...

...

{cloak:id=q17}

If you simply start the Qpid broker using the default configuration, then the log file is written to $QPID_WORK/log/qpid.log

...

To make life easier, there are two optional ways to configure the naming convention used for the broker log.

Setting a prefix or suffix

Users should set the following environment variables before running qpid-server:

...

QPID_LOG_SUFFIX - will suffix the file name with the specified value e.g. if you set this value to be the name of your application (for example) if could look something like qpidMyApp.log

Including the PID

Setting either of these variables to the special value PID will introduce the process id of the java process into the file name as a prefix or suffix as specified**

...

{cloak}
Wiki Markup
{

...

cloak

...

}

My client application appears to have hung?

...

...

{cloak:id=q14b}

The client code currently has various timeouts scattered throughout the code. These can cause your client to appear like it has hung when it is actually waiting for the timeout ot compelete. One example is when the broker becomes non-responsive, the client code has a hard coded 2 minute timeout that it will wait when closing a connection. These timeouts need to be consolidated and exposed. see QPID-429

Wiki Markup
{cloak}

...

. see QPID-429

How do I contact the Qpid team ?

...

...

{cloak:id=q15}

For general questions, please subscribe to the qpid-users@incubator.apache.org mailing list (archive).

...

More details on these lists are available on our mailing lists page.

Wiki Markup
{cloak}

...

How can I change a user's password while the broker is up ?

...

You can do this via the management console if you're using the base64password file (rather than plain text). To do this simply log in to the management console as an admin user (you need to have created an admin account in the jmxremote.access file first) and then select the 'Manage Users' pane. There is a 'Change Password' tab which you can then use. Alternatively, update the base64password file and use the management console to reload the file, in the 'Manage Users' pane. In both cases, this will take effect when the user next logs in i.e. will not cause them to be disconnected if they are already connected.

...

If you're using plain text passwords, then simply update your file and the content is read on every connection.

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=qKnowConsumerExisistToSendMessage}

How do I know if there is a consumer for a message I am going to send?

...

Knowing that there is a consumer for a message is quite tricky. That said using the qpid.jms.Session#createProducer with immediate and mandatory set to true will get you part of the way there.

...

These flags will not be able to tell you if the consuming application has received the message and is able to process it.

Wiki Markup
{cloak}

...

and is able to process it.

How do I use an InVM Broker for my own tests?

...

...

{cloak:id=qHowToWriteOwnInVMTests}

I would take a look at the testPassiveTTL in TimeToLiveTest

...

You will of course need to have the broker libraries on your class path for this to run.

Wiki Markup
{cloak}

...

How can I inspect the contents of my MessageStore?

...

There are two possibilities here:

...

2) The MessageStore Tool can be used to inspect the contents of a persistent message store. Note: this can currently only be used when the broker is offline.

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=slowtransient}

Why are my transient messages being so slow?

...

You should check that you aren't sending persistent messages, this is the default. If you want to send transient messages you must explicitly set this option when instantiating your MessageProducer or on the send() method.

Wiki Markup
{cloak}

...

on the send() method.

Why does my producer fill up the broker with messages?

...

...

{cloak:id=asyncpublish}

The Java broker does not currently implement producer flow control. Publishes are currently asynchronous, so there is no ability to rate limit this automatically. While this is something which will be addressed in the future, it is currently up to applications to ensure that they do not publish faster than the messages are being consumed for signifcant periods of time.

Wiki Markup
{cloak}

...

Why can't I connect the management console to the broker?

...

The CRAM-MD5 JMX authentication is currently broken in the broker, disable it by editing qpidmc.sh or qpidmc.bat and removing '-Dsecurity=CRAM-MD5' and setting security-disabled to false in the broker configuration file.

Wiki Markup
{cloak}

...

...

{toggle-cloak:id=OOMETransientBroker}

The broker keeps throwing an OutOfMemory exception?

...

The broker can no longer store any more messages in memory. This is particular evident if you are using the MemoryMessageStore. To alleviate this issue you should ensure that your clients are consuming all the messages from the broker.

You may also want to increase the memory allowance to the broker though this will only delay the exception if you are publishing messages faster than you are consuming. See Java Environment Variables for details of changing the memory settings.

Wiki Markup
{cloak}

...

.

Why am I getting a broker side exception when I try to publish to a queue or a topic ?

...

...

{cloak:id=ExchangeTypo}

If you get a stack trace like this when you try to publish, then you may have typo'd the exchange type in your queue or topic declaration. Open your virtualhosts.xml and check that the

...

No Format
2009-01-12 15:26:27,957 ERROR [pool-11-thread-2] protocol.AMQMinaProtocolSession (AMQMinaProtocolSession.java:365) - Unexpected exception while processing frame. Closing connection. 
java.lang.NullPointerException 
        at org.apache.qpid.server.security.access.PrincipalPermissions.authorise(PrincipalPermissions.java:398) 
        at org.apache.qpid.server.security.access.plugins.SimpleXML.authorise(SimpleXML.java:302) 
        at org.apache.qpid.server.handler.QueueBindHandler.methodReceived(QueueBindHandler.java:111) 
        at org.apache.qpid.server.handler.ServerMethodDispatcherImpl.dispatchQueueBind(ServerMethodDispatcherImpl.java:498) 
        at org.apache.qpid.framing.amqp_8_0.QueueBindBodyImpl.execute(QueueBindBodyImpl.java:167) 
        at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:204) 
        at org.apache.qpid.server.protocol.AMQMinaProtocolSession.methodFrameReceived(AMQMinaProtocolSession.java:295) 
        at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93) 
        at org.apache.qpid.server.protocol.AMQMinaProtocolSession.frameReceived(AMQMinaProtocolSession.java:235) 
        at org.apache.qpid.server.protocol.AMQMinaProtocolSession.dataBlockReceived(AMQMinaProtocolSession.java:191) 
        at org.apache.qpid.server.protocol.AMQPFastProtocolHandler.messageReceived(AMQPFastProtocolHandler.java:244) 
        at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703) 
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) 
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) 
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) 
        at org.apache.qpid.pool.PoolingFilter.messageReceived(PoolingFilter.java:371) 
        at org.apache.mina.filter.ReferenceCountingIoFilter.messageReceived(ReferenceCountingIoFilter.java:96) 
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) 
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) 
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) 
        at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:60) 
        at org.apache.mina.filter.codec.QpidProtocolCodecFilter.messageReceived(QpidProtocolCodecFilter.java:174) 
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362) 
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1200(AbstractIoFilterChain.java:54) 
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800) 
        at org.apache.qpid.pool.Event$ReceivedEvent.process(Event.java:86) 
        at org.apache.qpid.pool.Job.processAll(Job.java:110) 
        at org.apache.qpid.pool.Job.run(Job.java:149) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) 
        at java.lang.Thread.run(Thread.java:619) 
Wiki Markup
{cloak}

...

Why is there a lot of AnonymousIoService threads

...

These threads are part of the thread pool used by Mina to process the socket. In the future we may provide tuning guidelines but at this point we have seen no performance implications from the current configuration. As the threads are part of a pool they should remain inactive until required.

...