You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Iain Emsley <ia...@gmail.com> on 2011/09/08 10:21:20 UTC

Configuring ActiveMQ for use with Java producer and PHP consumer

Morning,

I am currently working on a project to link two systems together using
ActiveMQ.

The ActiveMQ instance is running 5.5 on a Windows box with a Java producer
sending messages into it using tcp transport. The PHP client on a Linux box
is using Stomp to retrieve the messages from the queue.

When I use a PHP producer and consumer, I can send messages to queue
TEST.FOO and retrieve them as they come in to the queue.

However when I use the java producer tool, then the PHP using a standard
STOMP connection gets a message every 5 minutes but if I use STOMP+SSL, then
the consumer just hangs and no message is consumed. The logs suggest that
the consumer is accepted and connects correctly:
2011-09-08 08:43:45,593 | DEBUG | Setting up new connection id: ID:<connid>,
address: /127.0.0.1:49910 | org.apache.activemq.broker.TransportConnection |
ActiveMQ Transport: ssl:///127.0.0.1:49910
2011-09-08 08:43:45,595 | DEBUG | localhost adding consumer: ID:<connid> for
destination: queue://TEST.FOO |
org.apache.activemq.broker.region.AbstractRegion | ActiveMQ Transport:
ssl:///127.0.0.1:49910
When it appears to send messages the only log that I appear to be getting
is:
2011-09-08 08:43:58,145 | DEBUG | TEST.FOO toPageIn: 0, Inflight: 1,
pagedInMessages.size 5, enqueueCount: 2005, dequeueCount: 2000 |
org.apache.activemq.broker.region.Queue | Queue:TEST.FOO
which suggests that the message is being sent to the accepted consumer but
it never arrives and is not being dequeued.

If I run the Java tool (from the /examples directory), then the messages are
consumed in good time and in order. The logs for the Java tool looks
like:  DEBUG | RECEIVED: MessageAck {commandId = 1955, responseRequired =
false, ackType = 2, consumerId = ID:<id here>, firstMessageId = ID:<id
here>:1963, lastMessageId = ID:<id here>:1963, destination =
queue://TEST.FOO, transactionId = null, messageCount = 1, poisonCause =
null}

Both consumers are running on the command line.

I cannot see why the TCP to STOMP takes five minutes to dequeue, but assume
this is a configuration argument that I've not found yet. My main issue is
trying to get the STOMP+SSL connection working at the moment.

I'd be grateful for some help and advice in getting this issue resolved.

Thanks,

Iain