You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Albert Strasheim (JIRA)" <ji...@apache.org> on 2007/03/16 11:27:34 UTC
[jira] Created: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Openwire Session doesn't run its MessageListeners from a single thread
----------------------------------------------------------------------
Key: AMQCPP-90
URL: https://issues.apache.org/activemq/browse/AMQCPP-90
Project: ActiveMQ C++ Client
Issue Type: Bug
Components: Openwire
Affects Versions: 2.0
Reporter: Albert Strasheim
Assigned To: Nathan Mittler
Fix For: 2.0
According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
For this reason, JMS does not cause concurrent execution of client code unless
a client explicitly requests it. One way this is done is to define that a session
serializes all asynchronous delivery of messages.
To receive messages asynchronously, a client registers an object that
implements the JMS MessageListener interface with a MessageConsumer. In effect,
a Session uses a single thread to run all its MessageListeners. While the thread is
busy executing one listener, all other messages to be asynchronously delivered
to the session must wait.
In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38834 ]
Nathan Mittler commented on AMQCPP-90:
--------------------------------------
Hi Albert,
Would you mind attaching a simple main that demonstrates this?
Also, can you verify that switching to stomp yields the same problem? My guess is that it will.
Thanks,
Nate
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Mittler updated AMQCPP-90:
---------------------------------
Fix Version/s: (was: 2.1)
2.0
targeting 2.0
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nathan Mittler resolved AMQCPP-90.
----------------------------------
Resolution: Fixed
Fixed in trunk. I ran with the sample application and verfied that messages are always received in the same thread.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38880 ]
Nathan Mittler commented on AMQCPP-90:
--------------------------------------
could you submit a sample that causes the problem?
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQCPP-90.
--------------------------------
Resolution: Fixed
No fix needed
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Reopened: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Strasheim reopened AMQCPP-90:
------------------------------------
Revision 519590 seems to have broken our library's one unit test.
The test does the following:
- creates a connection
- sets an exception listener on the connection
- creates an asynchronous session
- uses the session to create one producer and one consumer associated with a topic
- sets a message listener on the consumer
- starts the connection
The test then uses the producer to send a BytesMessage to the consumer. The BytesMessage contains a single integer. The message listener tries to read two integers from the BytesMessage.
In revision 519589 this triggered the exception listener, which signals our test method through a latch and the test completes normally.
With revision 519590, reading the second integer causes the test to print:
Reached the end of the buffer
FILE: ..\src\main\activemq\io\ByteArrayInputStream.cpp, LINE: 104
FILE: ..\src\main\activemq\io\DataInputStream.cpp, LINE: 314
FILE: ..\src\main\activemq\io\DataInputStream.cpp, LINE: 104
FILE: ..\src\main\activemq\io\DataInputStream.cpp, LINE: 181
FILE: ..\src\main\activemq\core\ActiveMQConsumer.cpp, LINE: 378
to the console and then the program hangs. We also see this behaviour with the latest HEAD revision (519654).
I'm also seeing an intermittent segfault (can't reproduce it reliably yet). The stack trace looks like this:
> unittests.exe!activemq::core::ActiveMQConsumer::dispatch(activemq::core::DispatchData & data={...}) Line 368 + 0x16 bytes C++
unittests.exe!activemq::core::ActiveMQSessionExecutor::dispatch(activemq::core::DispatchData & data={...}) Line 140 C++
unittests.exe!activemq::core::ActiveMQSessionExecutor::dispatchAll() Line 185 C++
unittests.exe!activemq::core::ActiveMQSessionExecutor::run() Line 152 C++
unittests.exe!activemq::concurrent::Thread::runCallback(void * param=0x008d3748) Line 152 + 0x13 bytes C++
msvcr80d.dll!102047c1()
[Frames below may be incorrect and/or missing, no symbols loaded for msvcr80d.dll]
msvcr80d.dll!10204767()
kernel32.dll!7c80b683()
This seems to also have caused by a recent change, as I've never seen this before today.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Strasheim updated AMQCPP-90:
-----------------------------------
Attachment: MultipleConsumerTest.java
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Strasheim updated AMQCPP-90:
-----------------------------------
Attachment: MultipleConsumerTest.cpp
Here's the C++. Will attach Java next. I had these attached, but my previous attempt to submit the issue timed out and I forgot to add them again.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38837 ]
Albert Strasheim commented on AMQCPP-90:
----------------------------------------
Yep, looks like Stomp has the same issue.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Nathan Mittler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38881 ]
Nathan Mittler commented on AMQCPP-90:
--------------------------------------
If I understand this correctly, you're trying to cause an exception from your MessageListener and have it propagate to your ExceptionListener handler.
It would seem that throwing exceptions would violate the observer pattern. The ExceptionListener is for exceptions that occur on the connection, itself - not user-generated error conditions. I would say that what it does now (absorb the user exception) is the correct behavior.
To achieve the results you're looking for, it would seem that you could have a common exception handler that is shared by both your ExceptionListener and MessageListener objects.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Albert Strasheim (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_38882 ]
Albert Strasheim commented on AMQCPP-90:
----------------------------------------
Makes sense. Wonder how it worked with the old AMQCPP code. Anyway, I'll fix my test. You can probably resolve this issue.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.0
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (AMQCPP-90) Openwire Session doesn't run its
MessageListeners from a single thread
Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/activemq/browse/AMQCPP-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish updated AMQCPP-90:
-------------------------------
Fix Version/s: (was: 2.0)
2.1
Moving this to 2.1. We want to get a release with openwire out in the wild first, then we can focus on this issue.
> Openwire Session doesn't run its MessageListeners from a single thread
> ----------------------------------------------------------------------
>
> Key: AMQCPP-90
> URL: https://issues.apache.org/activemq/browse/AMQCPP-90
> Project: ActiveMQ C++ Client
> Issue Type: Bug
> Components: Openwire
> Affects Versions: 2.0
> Reporter: Albert Strasheim
> Assigned To: Nathan Mittler
> Fix For: 2.1
>
> Attachments: MultipleConsumerTest.cpp, MultipleConsumerTest.java
>
>
> According to the JMS 1.1 specification, section 4.4.14 Serial Execution of Client Code:
> For this reason, JMS does not cause concurrent execution of client code unless
> a client explicitly requests it. One way this is done is to define that a session
> serializes all asynchronous delivery of messages.
> To receive messages asynchronously, a client registers an object that
> implements the JMS MessageListener interface with a MessageConsumer. In effect,
> a Session uses a single thread to run all its MessageListeners. While the thread is
> busy executing one listener, all other messages to be asynchronously delivered
> to the session must wait.
> In the attached code I have 5 consumers created from the same session, all with the same message listener instance that receives a message, prints something and then sleeps for a while. When running the C++ code, one sees that 5 messages (there are 5 consumers) are delivered at approximately the same time. Under Java, one only sees 1 message delivered per interval.
> This seems to indicate that the Openwire Session doesn't run its MessageListeners from a single thread. This can cause problems if the user's MessageListener isn't thread safe.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.