You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Daniel Ellis (JIRA)" <ji...@apache.org> on 2009/07/08 23:04:07 UTC

[jira] Created: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Messages received by a transactional session are not redelivered when the session dies before being commited.
-------------------------------------------------------------------------------------------------------------

                 Key: AMQNET-176
                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ Client
         Environment: .NET 2.0 on Windows XP
            Reporter: Daniel Ellis
            Assignee: Jim Gomes


In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-

1.  Create a connection and a transactional session.
2.  Create a queue consumer, add a listener and start the connection.
3.  Add a message to the queue, the message will arrive on the consumer.
4.  Kill the session (either dispose of the session and connection, or just kill the process)
5.  Perform steps 1 & 2 again.

Note that the message is not redelivered.

We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.

To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.

I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.

I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.

Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54953#action_54953 ] 

Timothy Bish commented on AMQNET-176:
-------------------------------------

I've finished with the initial rewrite of the code, and am now testing the changes.  For the times when things work without crashing I can confirm that messages are left in the Queue marked as delivered but not consumed until the session is committed, killing my client and reconnecting results in the message being redelivered as expected.

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jim Gomes updated AMQNET-176:
-----------------------------

    Affects Version/s: 1.1.0
        Fix Version/s: 1.2.0

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Jim Gomes
>             Fix For: 1.2.0
>
>         Attachments: Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Daniel Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Ellis updated AMQNET-176:
--------------------------------

    Attachment: Message to JMS transactional session.pcap
                Message to NMS transactional session.pcap

Attached are two Wireshark traces.  The first is the trace of the NMS example, where I sent a text message from the web admin console, the message was "Message 1".  The second is the example where I sent a message to my JMS app, the message was "Message 2".

I am unable to decipher the captures because there is no Openwire dissector for Wireshark (shame).  But looking at the TCP messages, there is clearly much more data sent back to the broker after the message is received when using the NMS client.

JMS Client: 1 packet sent after received message (21 bytes)
NMS Client: 2 packets sent after received message (103 + 295 bytes)


> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Jim Gomes
>         Attachments: Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55062#action_55062 ] 

Timothy Bish commented on AMQNET-176:
-------------------------------------

I've been adding many new unit tests since the release of NMS 1.1 which had 134 tests, we are now at 343.  The listed revision for this fix is passing all tests consistently.  

That said, trunk is still in flux so anything beyond the listed rev might be unstable as I add things like Individual ack etc.  You are welcome to grab the latest NMS and NMS.ActiveMQ source and test it out.  If you find any new issues please create a new Jira to cover it and if you want to try and create an NUnit test case that demonstrates the issue that'd really be helpful as we can incorporate that into the test suite so we know your issue is fixed and stays fixed in later builds.

Good luck, and we welcome any feedback.

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Mark Gellings (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54876#action_54876 ] 

Mark Gellings commented on AMQNET-176:
--------------------------------------

I can also confirm this is a problem.  When we restart a consumer there are many times a message gets stuck in the queue at a redelivered state.  It does not get redelivered to another consumer or when a single consumer starts back up.  It doesn't matter what the max redelivery count is set at, 5, 10, 5000, if the consumer stops the message ceases to be redelivered.

This seems like a big problem with transactional acknowledgement mode.  This requires manual intervention to get the stuck message to be processed again essentially by having to recreate it.

If we can do anything to help with this issue let us know.  We can provide a test case as well but looks like Daniel did a good job with that!

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54880#action_54880 ] 

Timothy Bish commented on AMQNET-176:
-------------------------------------

I'm in the process of rewriting a large majority of the code that deals with message dispatch and acknowledgement. Once that effort is complete we will certainly needs folks to test it and report back.  Stay tuned.

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54831#action_54831 ] 

Timothy Bish commented on AMQNET-176:
-------------------------------------

There are some issues with the way messages are acknowledged in transacted session that I think is the root cause of this.

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=52755#action_52755 ] 

Jim Gomes commented on AMQNET-176:
----------------------------------

Do you have some sample code that demonstrates this issue?  This seems to break the basic transactional contract, so it would be interesting to see exactly where it's going wrong.

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Jim Gomes
>             Fix For: 1.2.0
>
>         Attachments: Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Daniel Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Ellis updated AMQNET-176:
--------------------------------

    Attachment: ActiveMQ-Test.zip

I have attached the test project that I put together.  It is a Visual Studio 2005 project.  The config file is configured to point to localhost.  I have just tested this with ActiveMQ 5.2 and a recent 5.3 snapshot.

To test the scenario perform the following operations:

1. Start the ActiveMQ test app.
2. Click Connection -> Connect
3. Click Session -> Create -> Transactional
4. Enter the queue name (or leave it as MyQueue)
5. Click Create Consumer
6. Click Add listener
7. Click Connection -> Start
8. Using the ActiveMQ web admin send a message to the queue
9. The message will arrive on the consumer.
10. Click Connection -> Kill Process
11. Perform steps 1-7 again

Notice that the message is not re-delivered, but is still shown on the queue when viewing the web admin.

You can also test closing the consumer/session by just closing the relevant windows.  You can also run multiple instances of the application which is useful for testing delivery across connections.


> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ Client
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Jim Gomes
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54962#action_54962 ] 

Timothy Bish commented on AMQNET-176:
-------------------------------------

I've checked in my current changes to NMS.ActiveMQ now that the unit tests are all passing (most of the time).  There is still some more work to be done but things are working fairly well now.  I'm going to be adding in several new Unit tests over the course of the next week to help ensure the code works as it should.  

Users are welcome to try out the current trunk code, however its most likely going to be a bit unstable for awhile yet,

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish reassigned AMQNET-176:
-----------------------------------

    Assignee: Timothy Bish  (was: Jim Gomes)

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Mark Gellings (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54982#action_54982 ] 

Mark Gellings commented on AMQNET-176:
--------------------------------------

We have a solid test case setup for stress testing NMS.

We'll stress test it once the new Unit tests are added.  

Let us know.

-Thanks

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Mark Gellings (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=55061#action_55061 ] 

Mark Gellings commented on AMQNET-176:
--------------------------------------

Is this considered stable now?  Did you add more unit tests as you wanted?

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AMQNET-176) Messages received by a transactional session are not redelivered when the session dies before being commited.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-176?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQNET-176.
---------------------------------

    Resolution: Fixed

Resolved in Trunk: Rev 830751

> Messages received by a transactional session are not redelivered when the session dies before being commited.
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQNET-176
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-176
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.1.0
>         Environment: .NET 2.0 on Windows XP
>            Reporter: Daniel Ellis
>            Assignee: Timothy Bish
>             Fix For: 1.2.0
>
>         Attachments: ActiveMQ-Test.zip, Message to JMS transactional session.pcap, Message to NMS transactional session.pcap
>
>
> In our testing we have discovered that messages are not redelivered as expected when we are using a transactional session.  The test goes as follows:-
> 1.  Create a connection and a transactional session.
> 2.  Create a queue consumer, add a listener and start the connection.
> 3.  Add a message to the queue, the message will arrive on the consumer.
> 4.  Kill the session (either dispose of the session and connection, or just kill the process)
> 5.  Perform steps 1 & 2 again.
> Note that the message is not redelivered.
> We expect the message to be redelivered because the transaction was never committed.  Looking at the Queues page on the web admin, you can see the queue count is still 1.  So the message is still on the broker.
> To diagnose whether this is an NMS issue or an ActiveMQ issue, I created a Java application to test this issue using JMS.
> The resulting behaviour is as expected when using JMS.  After the message is received, I can either cleanly dispose the session, or kill the application, and the message will be redelivered next time you start the app.
> I was a little confused as to why the message did not get redelivered, in the example where I simply kill the process.  I would expect the broker to handle NMS and JMS clients the same, as the TCP connection would simply be terminated.
> I then noticed a difference between NMS and JMS, when looking in the web admin.   When a message arrives on a JMS client the queue count shows 1, and clicking on the queue shows the message still on the queue.  When a message arrives on an NMS client, the queue count goes to 1, but clicking on the queue shows no messages.
> Clearly, there is a difference between how JMS and NMS handle an incoming message on a transactional session.  Could it be that NMS is sending an ack for each message when it shouldn't?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.