Child pages
  • ActiveMQ URI Configuration

Versions Compared

Key

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

...

Using the Generic NMSConnectionFactory class would look as follows:

No Format

var cf = new NMSConnectionFactory(
    "activemq:tcp://localhost:61616?wireFormat.tightEncodingEnabled=true");

You can also use the ActiveMQ ConecctionFactory implementation directory:

No Format

var cf = new Apache.NMS.ActiveMQ.ConnectionFactory(
    "tcp://localhost:61616?wireFormat.tightEncodingEnabled=true");

Protocol Options

Option Name

Description

tcp

Uses TCP/IP Sockets to connect to the Broker.

ssl

Uses TCP/IP Sockets to connect to the Broker with an added SSL layer.

discovery

Uses The Discovery Transport to find a Broker

failover

Uses the Failover Transport to connect and reconnect to one or more Brokers

...

Example Configuration
No Format

d = session.CreateTopic("com.foo?consumer.prefetchSize=2000&consumer.noLocal=true");

...

Option Name

Default

Description

consumer.prefetchSize

1000

The number of message the consumer will prefetchRemoved in v1.7.0 use connection prefetch policy instead.

consumer.maximumPendingMessageLimit

0

Use to control if messages are dropped if a slow consumer situation exists.

consumer.noLocal

false

Same as the noLocal flag on a Topic consumer. Exposed here so that it can be used with a queue.

consumer.dispatchAsync

false

Should the broker dispatch messages asynchronously to the consumer.

consumer.retroactive

false

Is this a Retroactive Consumer.

consumer.selector

null

JMS Selector used with the consumer.

consumer.exclusive

false

Is this an Exclusive Consumer.

consumer.priority

0

Allows you to configure a Consumer Priority.

...