You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by mhandy <ma...@nasa.gov> on 2011/10/25 21:10:20 UTC
TraceBrokerPathPlugin
I'm attempting to enable the traceBrokerPathPlugin on my ActiveMQ server. I'm
using version 5.5.1. I've enabled the loggingBrokerPlugin, so I can see in
the server logs of the postProcessDispatch for my messages that the JMS
property SERVER_NAME is being inserted into my messages as I expect.
However, when my client receives those messages, the SERVER_NAME JMS
property does not exist. I was wondering if anyone has had a similar problem
or an idea how to resolve the issue. I'm appending the contents of my
activemq.xml file, all other files under conf are left as default
Thanks.
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd">
<bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
brokerName="mhandy-dev" dataDirectory="${activemq.base}/data"
destroyApplicationContextOnStop="true">
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry topic=">" producerFlowControl="true"
memoryLimit="1mb">
<pendingSubscriberPolicy>
<vmCursor />
</pendingSubscriberPolicy>
</policyEntry>
<policyEntry queue=">" producerFlowControl="true"
memoryLimit="1mb">
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<persistenceAdapter>
<kahaDB directory="${activemq.base}/data/kahadb"/>
</persistenceAdapter>
<plugins>
<loggingBrokerPlugin logAll="true" logConnectionEvents="false"/>
<timeStampingBrokerPlugin zeroExpirationOverride="1000"
ttlCeiling="60000" futureOnly="true"/>
<traceBrokerPathPlugin stampProperty="SERVER_NAME" />
</plugins>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
</transportConnectors>
</broker>
<import resource="jetty.xml"/>
</beans>
--
View this message in context: http://activemq.2283324.n4.nabble.com/TraceBrokerPathPlugin-tp3937868p3937868.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: TraceBrokerPathPlugin
Posted by mhandy <ma...@nasa.gov>.
Hi Gary,
I have a block that goes like so:
const cms::BytesMessage *bytesMessage = dynamic_cast<const
cms::BytesMessage*>(cmsMessage);
std::vector<std::string> properties(bytesMessage->getPropertyNames());
for (std::vector<std::string>::iterator i = properties.begin(); i !=
properties.end(); ++i)
LOG_VERBOSE << "\t" << *i;
to print out the list of properties, and it does not appear. Just for
jollies, I tried pulling the property out with:
std::string currentServer = bytesMessage->getStringProperty("SERVER_NAME");
and that throws an exception when the message does not have that property.
To confirm that I'm accessing the property correctly, I've tried to have my
publisher add a dummy value for SERVER_NAME. When publishing messages like
this, I can see in the ActiveMQ logs that the broker name is appended to the
dummy value, however the message that the subscriber receives only has that
dummy value populating the SERVER_NAME property.
Thanks
--
View this message in context: http://activemq.2283324.n4.nabble.com/TraceBrokerPathPlugin-tp3937868p3937933.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: TraceBrokerPathPlugin
Posted by Gary Tully <ga...@gmail.com>.
how are you checking for that property in the client? Can you paste the code?
On 25 October 2011 20:10, mhandy <ma...@nasa.gov> wrote:
> I'm attempting to enable the traceBrokerPathPlugin on my ActiveMQ server. I'm
> using version 5.5.1. I've enabled the loggingBrokerPlugin, so I can see in
> the server logs of the postProcessDispatch for my messages that the JMS
> property SERVER_NAME is being inserted into my messages as I expect.
> However, when my client receives those messages, the SERVER_NAME JMS
> property does not exist. I was wondering if anyone has had a similar problem
> or an idea how to resolve the issue. I'm appending the contents of my
> activemq.xml file, all other files under conf are left as default
>
> Thanks.
>
>
>
> <beans
> xmlns="http://www.springframework.org/schema/beans"
> xmlns:amq="http://activemq.apache.org/schema/core"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.springframework.org/schema/beans
> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> http://activemq.apache.org/schema/core
> http://activemq.apache.org/schema/core/activemq-core.xsd">
>
>
> <bean
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
> <property name="locations">
> <value>file:${activemq.base}/conf/credentials.properties</value>
> </property>
> </bean>
>
>
> <broker xmlns="http://activemq.apache.org/schema/core"
> brokerName="mhandy-dev" dataDirectory="${activemq.base}/data"
> destroyApplicationContextOnStop="true">
>
>
>
> <destinationPolicy>
> <policyMap>
> <policyEntries>
> <policyEntry topic=">" producerFlowControl="true"
> memoryLimit="1mb">
> <pendingSubscriberPolicy>
> <vmCursor />
> </pendingSubscriberPolicy>
> </policyEntry>
> <policyEntry queue=">" producerFlowControl="true"
> memoryLimit="1mb">
>
> </policyEntry>
> </policyEntries>
> </policyMap>
> </destinationPolicy>
>
>
>
> <managementContext>
> <managementContext createConnector="false"/>
> </managementContext>
>
>
> <persistenceAdapter>
> <kahaDB directory="${activemq.base}/data/kahadb"/>
> </persistenceAdapter>
>
>
>
> <plugins>
> <loggingBrokerPlugin logAll="true" logConnectionEvents="false"/>
> <timeStampingBrokerPlugin zeroExpirationOverride="1000"
> ttlCeiling="60000" futureOnly="true"/>
> <traceBrokerPathPlugin stampProperty="SERVER_NAME" />
> </plugins>
>
>
> <transportConnectors>
> <transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/>
> </transportConnectors>
>
> </broker>
>
>
> <import resource="jetty.xml"/>
>
> </beans>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/TraceBrokerPathPlugin-tp3937868p3937868.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
--
http://fusesource.com
http://blog.garytully.com