Return-Path: X-Original-To: apmail-activemq-dev-archive@www.apache.org Delivered-To: apmail-activemq-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5063211224 for ; Wed, 6 Aug 2014 13:31:13 +0000 (UTC) Received: (qmail 41709 invoked by uid 500); 6 Aug 2014 13:31:13 -0000 Delivered-To: apmail-activemq-dev-archive@activemq.apache.org Received: (qmail 41654 invoked by uid 500); 6 Aug 2014 13:31:13 -0000 Mailing-List: contact dev-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list dev@activemq.apache.org Received: (qmail 41638 invoked by uid 99); 6 Aug 2014 13:31:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Aug 2014 13:31:13 +0000 Date: Wed, 6 Aug 2014 13:31:12 +0000 (UTC) From: "Piotr Klimczak (JIRA)" To: dev@activemq.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMQ-5220) Advisory messages are still empty when received with a Stomp subscription MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMQ-5220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087659#comment-14087659 ] Piotr Klimczak commented on AMQ-5220: ------------------------------------- Yes, sure. But just was curious what was the reason. So the problem is combination of 2 reasons: 1. Stomp ProtocolConverter expects the stomp client to directly subscribe advisory addresses. So it will work when subscribing topic is prefixed with "ActiveMQ.Advisory." 2. Statistics plugin is kind of unique advisory system, as instead if directly subscribing advisory topic, you need to send a message with reply-to header. So when reply-to header and your reply topic has a name without "ActiveMQ.Advisory." prefix, then it fails as translator finder is assuming that destination (or rather source) is not and advisory one. It simply ueses wrong frame translator. It thinks that it is a byte or string message while it is map message. So I will try to prepare both: unit test and fix for this problem. Greetings Piotr Klimczak > Advisory messages are still empty when received with a Stomp subscription > ------------------------------------------------------------------------- > > Key: AMQ-5220 > URL: https://issues.apache.org/jira/browse/AMQ-5220 > Project: ActiveMQ > Issue Type: Bug > Components: Transport > Affects Versions: 5.x > Environment: ActiveMQ 5.9.1, Sun Java 1.7.0_51, Ubuntu Linux > Reporter: Vladislav Krakhalev > Fix For: WAITING_FOR_TEST > > > The subject of this task similiar as AMQ-2098. Bug still exists, and it can be reproduced according to steps below. > This simple script written in PHP uses standard Stomp client > {code} > $stomp = new \Stomp('tcp://localhost:61613', 'admin', 'admin'); > $stomp->subscribe('/topic/stats'); > $stomp->begin($transaction = microtime(true)); > $status = $stomp->send('/queue/ActiveMQ.Statistics.Destination.testqueue', '', Array('reply-to' => '/topic/stats', 'persistent' => 'true')); > $message = $stomp->readFrame(); > $stomp->ack($message->headers['message-id']); > $stomp->commit($transaction); > {code} > And in $message we'll have empty body paramter. It's because ActiveMQ returned message without body that's show in a captured packets between ActiveMQ and PHP communication below > {code} > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > CONNECT > login:admin > passcode:admin > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > . > T 127.0.0.1:61613 -> 127.0.0.1:53988 [AP] > CONNECTED > heart-beat:0,0 > session:ID:amneziac-59996-1402320672417-5:8 > server:ActiveMQ/5.9.1 > version:1.0 > . > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > SUBSCRIBE > ack:client > destination:/topic/stats > activemq.prefetchSize:1 > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > . > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > BEGIN > transaction:1402321825.9952 > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > . > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > SEND > reply-to:/topic/stats > persistent:true > destination:/queue/ActiveMQ.Statistics.Destination.testqueue > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > . > T 127.0.0.1:61613 -> 127.0.0.1:53988 [AP] > MESSAGE > message-id:ID:amneziac-59996-1402320672417-2:1:0:0:8 > type:Advisory > destination:/topic/stats > timestamp:1402321826311 > expires:0 > priority:4 > . > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > ACK > message-id:ID:amneziac-59996-1402320672417-2:1:0:0:8 > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > . > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AP] > COMMIT > transaction:1402321825.9952 > T 127.0.0.1:53988 -> 127.0.0.1:61613 [AFP] > . > DISCONNECT > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)