activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugene Prokopiev <prokop...@stc.donpac.ru>
Subject Re: Jencks : transactional consuming and producing message problem
Date Tue, 01 Aug 2006 13:57:03 GMT
>     public void onMessage(final Message message) {
>         log.debug("MESSAGE : "+message);
>         template.send(destination, new MessageCreator() {
>             public Message createMessage(Session session) throws 
> JMSException {
>                 return message;
>             }           
>         });
>     }

I replaced this code with:

	public void onMessage(final Message message) {
		log.debug("MESSAGE : "+message);
		if (message instanceof TextMessage) {
			template.send(destination, new MessageCreator() {
				public Message createMessage(Session session) throws JMSException {
					return session.createTextMessage(((TextMessage)message).getText());
				}			
			});
		}		
	}

But the main problem was stay. Why message was not deleted from 
messages.input but placed to messages.output?

-- 
Thanks,
Eugene Prokopiev


Mime
View raw message