activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davdres <dave_dres...@compuware.com>
Subject Re: MessageTransformer and JMS Stream messages
Date Thu, 28 Jan 2010 14:33:31 GMT

I really didn't expect anything because I didn't anticpate this style of
message.  I am using the transformer intercept to add a property to the
message.  Therefore it would satisfy my use if the transformer was invoked
only once.  However, given the concept of a transformer I would think that
it would be invoked on each send.  For example if you wanted to encrypt each
segment.


Gary Tully wrote:
> 
> my guess is that it is intentional as the whole message is not present at
> any point. A stream is a type of producer that sends multiple bytes
> messages
> till the stream is exhausted. I guess it could apply the transform to each
> of the individual messages that make up the stream. Is that what you
> expect?
> If so, it would be an easy changed to try out.
> 
> On 26 January 2010 17:46, davdres <dave_dresser@compuware.com> wrote:
> 
>>
>> I have been experimenting with using the MessageTransformer Interface to
>> tag
>> messages with security information (user and roles) at the producer. 
>> Then
>> the message transformer would validate and extract this information at
>> the
>> consumer allowing the consumer to perform audits and authorization based
>> on
>> the user.  It appears that if an output stream is created that the
>> registered transformer is not called.  Is this intentional or could this
>> be
>> a bug?  Pseudo code:
>>    factory = new ActiveMQConnectionFactory(
>>    factory.setTransformer( new JMS_Transformer())
>>    connection = factory.createConnection...
>>    session = connection.createSession...
>>    queue = session.createQueue...
>>    outputStream = connection.createOutputStream(queue)
>>    out.write ...
>> --
>> View this message in context:
>> http://old.nabble.com/MessageTransformer-and-JMS-Stream-messages-tp27326775p27326775.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: http://old.nabble.com/MessageTransformer-and-JMS-Stream-messages-tp27326775p27356891.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message