[
https://issues.apache.org/jira/browse/AMQNET-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980450#action_12980450
]
Mark Gellings commented on AMQNET-304:
--------------------------------------
Thanks for the prompt reply guys.
It actually works out better leaving it the way it is, as we can then use the
same Connection, yet set compression on/off based on a configured threshold.
If we want it on, we just set the Connection on the ActiveMQTextMessage.
For a lot of cases our queues do not consistently contain large messages, this
way the smaller ones are sent uncompressed while the larger ones can be
compressed, and the consumer then decompresses as necessary.
Thanks
> Allow compression when explicitly instantiating ActiveMQ messages
> -----------------------------------------------------------------
>
> Key: AMQNET-304
> URL: https://issues.apache.org/jira/browse/AMQNET-304
> Project: ActiveMQ .Net
> Issue Type: Improvement
> Components: NMS
> Environment: Win7
> Reporter: Mark Gellings
> Assignee: Timothy Bish
> Priority: Minor
> Fix For: 1.5.0
>
>
> When using NMS ActiveMQ provider if one explicitly instantiates an
> ActiveMQTextMessage you must set the Connection on it explicitly in order for
> compression to work. This is because when sending the message the
> UseCompression property is set on the Connection and the Connection is null
> unless set explicitly.
> Generating an ActiveMQTextMessage off of a Session sets the Connection
> appropriately. Consider setting the Connection when the producer sends the
> message so that compression kicks in if the Connection says to
> UseCompression, if one instantiates his own ActiveMQTextMessage instead of
> creating it through the Session object.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.