You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "David Wheeler (Created) (JIRA)" <ji...@apache.org> on 2012/02/27 22:03:48 UTC
[jira] [Created] (AMQ-3742) STOMP subscriber does not receive
TextMessage with null body sent from JMS
STOMP subscriber does not receive TextMessage with null body sent from JMS
--------------------------------------------------------------------------
Key: AMQ-3742
URL: https://issues.apache.org/jira/browse/AMQ-3742
Project: ActiveMQ
Issue Type: Bug
Components: stomp
Affects Versions: 5.5.1
Reporter: David Wheeler
If a JMS publisher sends a TextMessage with null body, any STOMP subscribers to the topic (I haven't tested queues) will not receive that message or any further messages on that topic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (AMQ-3742) STOMP subscriber does not
receive TextMessage with null body sent from JMS
Posted by "David Wheeler (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217559#comment-13217559 ]
David Wheeler edited comment on AMQ-3742 at 2/27/12 9:08 PM:
-------------------------------------------------------------
I've created the following extra test method that should reproduce the issue
{code:title=StompTest.java.patch}
Index: src/test/java/org/apache/activemq/transport/stomp/StompTest.java
===================================================================
--- src/test/java/org/apache/activemq/transport/stomp/StompTest.java (revision 1294315)
+++ src/test/java/org/apache/activemq/transport/stomp/StompTest.java (working copy)
@@ -1819,6 +1819,24 @@
doReplyToAcrossConnections("queue");
}
+ public void testSendNullBodyTextMessage() throws Exception {
+ String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ frame = stompConnection.receiveFrame();
+ assertTrue(frame.startsWith("CONNECTED"));
+
+ frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ sendMessage(null);
+ frame = stompConnection.receiveFrame();
+ assertNotNull("Message not received", frame);
+
+ frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+ }
+
private void doReplyToAcrossConnections(String type) throws Exception {
LOG.info("Starting test on Temp Destinations using a temporary: " + type);
{code}
was (Author: david@inomial.com):
I've created the following extra test method that should reproduce the issue
Index: src/test/java/org/apache/activemq/transport/stomp/StompTest.java
===================================================================
--- src/test/java/org/apache/activemq/transport/stomp/StompTest.java (revision 1294315)
+++ src/test/java/org/apache/activemq/transport/stomp/StompTest.java (working copy)
@@ -1819,6 +1819,24 @@
doReplyToAcrossConnections("queue");
}
+ public void testSendNullBodyTextMessage() throws Exception {
+ String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ frame = stompConnection.receiveFrame();
+ assertTrue(frame.startsWith("CONNECTED"));
+
+ frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ sendMessage(null);
+ frame = stompConnection.receiveFrame();
+ assertNotNull("Message not received", frame);
+
+ frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+ }
+
private void doReplyToAcrossConnections(String type) throws Exception {
LOG.info("Starting test on Temp Destinations using a temporary: " + type);
> STOMP subscriber does not receive TextMessage with null body sent from JMS
> --------------------------------------------------------------------------
>
> Key: AMQ-3742
> URL: https://issues.apache.org/jira/browse/AMQ-3742
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.5.1
> Reporter: David Wheeler
>
> If a JMS publisher sends a TextMessage with null body, any STOMP subscribers to the topic (I haven't tested queues) will not receive that message or any further messages on that topic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (AMQ-3742) STOMP subscriber does not receive
TextMessage with null body sent from JMS
Posted by "David Wheeler (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Wheeler updated AMQ-3742:
-------------------------------
Attachment: StompTest.java.patch
Patch file attached (sorry - I couldn't work out how to attach a file in JIRA)
> STOMP subscriber does not receive TextMessage with null body sent from JMS
> --------------------------------------------------------------------------
>
> Key: AMQ-3742
> URL: https://issues.apache.org/jira/browse/AMQ-3742
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.5.1
> Reporter: David Wheeler
> Attachments: StompTest.java.patch
>
>
> If a JMS publisher sends a TextMessage with null body, any STOMP subscribers to the topic (I haven't tested queues) will not receive that message or any further messages on that topic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3742) STOMP subscriber does not receive
TextMessage with null body sent from JMS
Posted by "Timothy Bish (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217565#comment-13217565 ]
Timothy Bish commented on AMQ-3742:
-----------------------------------
You need to attach you patch as a file to this issue and tick the "grant license to apache" checkbox so we can include it. Thanks.
> STOMP subscriber does not receive TextMessage with null body sent from JMS
> --------------------------------------------------------------------------
>
> Key: AMQ-3742
> URL: https://issues.apache.org/jira/browse/AMQ-3742
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.5.1
> Reporter: David Wheeler
>
> If a JMS publisher sends a TextMessage with null body, any STOMP subscribers to the topic (I haven't tested queues) will not receive that message or any further messages on that topic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (AMQ-3742) STOMP subscriber does not receive
TextMessage with null body sent from JMS
Posted by "Timothy Bish (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Timothy Bish resolved AMQ-3742.
-------------------------------
Resolution: Fixed
Fix Version/s: 5.6.0
Assignee: Timothy Bish
Fix applied on trunk. Thanks for the test case.
> STOMP subscriber does not receive TextMessage with null body sent from JMS
> --------------------------------------------------------------------------
>
> Key: AMQ-3742
> URL: https://issues.apache.org/jira/browse/AMQ-3742
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.5.1
> Reporter: David Wheeler
> Assignee: Timothy Bish
> Fix For: 5.6.0
>
> Attachments: StompTest.java.patch
>
>
> If a JMS publisher sends a TextMessage with null body, any STOMP subscribers to the topic (I haven't tested queues) will not receive that message or any further messages on that topic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (AMQ-3742) STOMP subscriber does not receive
TextMessage with null body sent from JMS
Posted by "David Wheeler (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AMQ-3742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13217559#comment-13217559 ]
David Wheeler commented on AMQ-3742:
------------------------------------
I've created the following extra test method that should reproduce the issue
Index: src/test/java/org/apache/activemq/transport/stomp/StompTest.java
===================================================================
--- src/test/java/org/apache/activemq/transport/stomp/StompTest.java (revision 1294315)
+++ src/test/java/org/apache/activemq/transport/stomp/StompTest.java (working copy)
@@ -1819,6 +1819,24 @@
doReplyToAcrossConnections("queue");
}
+ public void testSendNullBodyTextMessage() throws Exception {
+ String frame = "CONNECT\n" + "login: system\n" + "passcode: manager\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ frame = stompConnection.receiveFrame();
+ assertTrue(frame.startsWith("CONNECTED"));
+
+ frame = "SUBSCRIBE\n" + "destination:/queue/" + getQueueName() + "\n" + "ack:auto\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+
+ sendMessage(null);
+ frame = stompConnection.receiveFrame();
+ assertNotNull("Message not received", frame);
+
+ frame = "DISCONNECT\n" + "\n\n" + Stomp.NULL;
+ stompConnection.sendFrame(frame);
+ }
+
private void doReplyToAcrossConnections(String type) throws Exception {
LOG.info("Starting test on Temp Destinations using a temporary: " + type);
> STOMP subscriber does not receive TextMessage with null body sent from JMS
> --------------------------------------------------------------------------
>
> Key: AMQ-3742
> URL: https://issues.apache.org/jira/browse/AMQ-3742
> Project: ActiveMQ
> Issue Type: Bug
> Components: stomp
> Affects Versions: 5.5.1
> Reporter: David Wheeler
>
> If a JMS publisher sends a TextMessage with null body, any STOMP subscribers to the topic (I haven't tested queues) will not receive that message or any further messages on that topic.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira