0

Active MQ CPP:

When I register a listener for a particular Queue in ActiveMQ-CPP, How does the ActiveMQ server send the message back to the client (when the message is available)? Specifically, does it open a new connection every time to the client to push the message? Is the connection from Server to client controllable (port number, one connection vs. many connections etc)?

Please note that this not about client registering a listener to the server (queue/topic). This is the other way round.

Thank you.

M99
  • 1,859
  • 10
  • 28
  • 50

1 Answers1

1

The client maintains an open connection to the broker. When messages are available for dispatch the broker sends them to the client using this connection. The transport options allow you to configure things on the client connection, see the configuration page.

Tim Bish
  • 17,475
  • 4
  • 32
  • 42
  • Thank you. What happens if a connection get interrupted? Will the client reestablishes the connection? I am asking this because, My client should register a listener and receive messages for ever. Some times the client might not receive any messages for days. Thanks. – M99 Oct 11 '11 at 14:48
  • You should really spend some time reading through the information on the website. The client offers a choice of a few different transports to connect to ActiveMQ, you can use the Failover transport to ensure that if the client connection drops it will get reconnected. – Tim Bish Oct 11 '11 at 23:46