-
1. Re: Message acknowledgement and durable subscription
adrian.brock Oct 22, 2002 4:51 PM (in response to bernd.koecke)Hi,
I committed a "fix" to 3.2 yesterday that should
solve your problem.
The spec isn't very clear. The closest I could come
to an answer was the javadoc for QueueSession
My fix, nacks (negative acknowledgement) all
unacknowledged messages at session close
or when the connection to the client drops.
NOTE: There is still an outstanding bug, where
if you shutdown jboss it loses the "redelivered"
flag. It's not top of my list of things to fix at
the moment, so maybe you can look at this? :-)
Regards,
Adrian -
2. Re: Message acknowledgement and durable subscription
bernd.koecke Oct 23, 2002 8:10 AM (in response to bernd.koecke)> Hi,
>
> I committed a "fix" to 3.2 yesterday that should
> solve your problem.
> The spec isn't very clear. The closest I could come
> to an answer was the javadoc for QueueSession
>
> My fix, nacks (negative acknowledgement) all
> unacknowledged messages at session close
> or when the connection to the client drops.
Thanks a lot! That solved my problem.
>
> NOTE: There is still an outstanding bug, where
> if you shutdown jboss it loses the "redelivered"
> flag. It's not top of my list of things to fix at
> the moment, so maybe you can look at this? :-)
Sure, I can give it try, but I don't have a deep knowledge of the sources, so it will take some time.
Thanks again
Bernd -
3. Re: Message acknowledgement and durable subscription
bernd.koecke Oct 23, 2002 2:19 PM (in response to bernd.koecke)Hi,
I tested a little bit more and it seems there is a little bug. I can't change the message selector of a durable subscription. In my test I make a durable subscription with clientId=TestClient and message selector EventName='test1'. All works fine, I send messages with the right property and the subscriber gets them. But when I shutdown the client and reconnect again with the same clientId but a selector like EventName='test2', the subscriber gets no messages at all (I send new messages with the property set to 'test2'). The jbossmq-state.xml isn't updated too. When I reconnect with the selector for test1 all works fine again. I could only change the selector when I unsubscribe from the topic.
A few days ago it was possible to reconnect with the same clientId and a different selector.
The state of acknowledgeMode or deliveryMode doesn't change the behaviour.
Thanks
Bernd -
4. Re: Message acknowledgement and durable subscription
adrian.brock Oct 23, 2002 5:57 PM (in response to bernd.koecke)Hi,
I don't think my fix has broken this. :-)
It looks like an existing bug.
The following comment appears in AbstractStateManager
// The topic previously subscribed to is not the same as the
// one in the subscription request.
// TODO: we do currently no check if the selector has changed.
else if (!subscription.getTopic().equals(topic.getName()))
{
I would guess it should have an extra check something
like:
else if (!subscription.getTopic().equals(topic.getName())
|| !subscription.getSelector().equals(sub.getSelector()))
If you have a testcase and the source do you want to
try this fix?
Regards,
Adrian -
5. Re: Message acknowledgement and durable subscription
adrian.brock Oct 23, 2002 9:51 PM (in response to bernd.koecke)It's more complicated than that,
so don't waste your time :-)
I think I've got a working, just writing some tests...
Regards,
Adrian -
6. Re: Message acknowledgement and durable subscription
bernd.koecke Oct 24, 2002 9:20 AM (in response to bernd.koecke)Testcases are no problem, should I test your last fix? I have a cvs version from yesterday and could update/patch to whatever you want :).
Bernd -
7. Re: Message acknowledgement and durable subscription
adrian.brock Oct 24, 2002 5:58 PM (in response to bernd.koecke)Sorry for the delay, I've been firefighting some
other problems. :-(
I've committed the fix for selector changes into 3.2
Regards,
Adrian -
8. Re: Message acknowledgement and durable subscription
bernd.koecke Oct 25, 2002 9:55 AM (in response to bernd.koecke)Thank you very mutch! It works very well.
Is the bug you mentioned above still valid? I didn't find it in Bugzilla.
Bernd -
9. Re: Message acknowledgement and durable subscription
adrian.brock Oct 25, 2002 10:47 PM (in response to bernd.koecke)The redelivered flag after a server restart?
It is still a bug.
Bugzilla?
Try www.sf.net/projects/jboss and click on bugs if
you want to report it.
Regards,
Adrian