Looking at this with jconsole:

IMessageConsumer consumer = session.CreateDurableConsumer(session.GetTopic("test.t"), "ConsumerId", "2 > 1", false);

results in a non durable subscription with an ActiveMQ generated consumer ID. The topic has a durable subscription created by code I wrote using ActiveMQCPP. So it seems the C# version doesn't work?

Alistair


--
mov eax,1
mov ebx,0
int 80h




On 20 Aug 2009, at 10:24, Alistair Young wrote:

I know the topic has persistent messages as the ActiveMQCPP stuff works ok, picking up messages it's missed. The NMS one doesn't though:

Uri connectURI = new Uri("activemq:tcp://host.com:61613? transport.wireformat=stomp"); IConnectionFactory factory = new ConnectionFactory(connectURI, "test- client-id");
IConnection connection = factory.CreateConnection();
connection.Start();
ISession session = connection.CreateSession(AcknowledgementMode.AutoAcknowledge);
ActiveMQTopic topic = new ActiveMQTopic("test.t");
IMessageConsumer consumer = session.CreateDurableConsumer(topic, "test-client-id", null, true);

it only picks up messages while it's connected. It doesn't pick up ones that it missed while it was offline.

Alistair



--
mov eax,1
mov ebx,0
int 80h





Reply via email to