You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Edward Campbell (JIRA)" <ji...@apache.org> on 2009/05/18 18:25:50 UTC

[jira] Updated: (CAMEL-1624) Subject not correctly set in xmpp message in both chat producers.

     [ https://issues.apache.org/activemq/browse/CAMEL-1624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Edward Campbell updated CAMEL-1624:
-----------------------------------

    Description: 
The code in XmppPrivateChatProducer and XmppGroupChatProducer does not call setSubject() on the org.jivesoftware.smack.packet.Message object.
Setting a subject property on the org.apache.camel.Message object produces a header on the Smack object via its superclass org.jivesoftware.smack.packet.Packet, but that never gets reflected in the Message object because the Message object does not override the setProperty() method on Packet.

private void send(String camelConnectionString) {
		final CamelContext camel = new DefaultCamelContext();
		camel.start();
		Endpoint endpoint = camel.getEndpoint(camelConnectionString);
		Exchange exchange = endpoint.createExchange(ExchangePattern.InOut);
		Producer producer = endpoint.createProducer();
		producer.start();

		// send the message
		Message message = exchange.getIn();
		message.setBody("The message body");
		message.setHeader("subject", "Message subject for filtering.");
		producer.process(exchange);
}

The annoying part about this, is that I am trying to integrate with a receiving system that handles messages using the subject as a key to determine how the message should be handled.


  was:
The code in XmppPrivateChatProducer and XmppGroupChatProducer does not call setSubject() on the org.jivesoftware.smack.packet.Message object.
Setting a subject property on the org.apache.camel.Message object produces a header on the Smack object via its superclass org.jivesoftware.smack.packet.Packet, but that never gets reflected in the Message object because the Message object does not override the setProperty() method on Packet.

private void send(String camelConnectionString) {
		final CamelContext camel = new DefaultCamelContext();
		camel.start();
		Endpoint endpoint = camel.getEndpoint(camelConnectionString);
		Exchange exchange = endpoint.createExchange(ExchangePattern.InOut);
		Producer producer = endpoint.createProducer();
		producer.start();

		// send the message
		Message message = exchange.getIn();
		message.setBody("The message body");
		message.setHeader("subject", "Message subject for filtering.");
		producer.process(exchange);
}

The annoying part about this, is that I am trying to integrate with a receiving system that handles messages based using the subject as a key to determine how the message should be handled.



> Subject not correctly set in xmpp message in both chat producers.
> -----------------------------------------------------------------
>
>                 Key: CAMEL-1624
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1624
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-xmpp
>    Affects Versions: 1.6.1
>            Reporter: Edward Campbell
>
> The code in XmppPrivateChatProducer and XmppGroupChatProducer does not call setSubject() on the org.jivesoftware.smack.packet.Message object.
> Setting a subject property on the org.apache.camel.Message object produces a header on the Smack object via its superclass org.jivesoftware.smack.packet.Packet, but that never gets reflected in the Message object because the Message object does not override the setProperty() method on Packet.
> private void send(String camelConnectionString) {
> 		final CamelContext camel = new DefaultCamelContext();
> 		camel.start();
> 		Endpoint endpoint = camel.getEndpoint(camelConnectionString);
> 		Exchange exchange = endpoint.createExchange(ExchangePattern.InOut);
> 		Producer producer = endpoint.createProducer();
> 		producer.start();
> 		// send the message
> 		Message message = exchange.getIn();
> 		message.setBody("The message body");
> 		message.setHeader("subject", "Message subject for filtering.");
> 		producer.process(exchange);
> }
> The annoying part about this, is that I am trying to integrate with a receiving system that handles messages using the subject as a key to determine how the message should be handled.

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