Topic
4 replies Latest Post - ‏2012-12-30T07:38:48Z by fjb_saper
bmsiddesh
bmsiddesh
4 Posts
ACCEPTED ANSWER

Pinned topic Message payload compression in MQ V6.0

‏2012-12-13T12:03:43Z |
Hi,

Can we compress the message payload in MQ V6.0 before putting a message into the destination queue?

We are using WAS 6.1 and Websphere MQ messaging provider as JMS provider.

Thanks,
Siddesh
Updated on 2012-12-30T07:38:48Z at 2012-12-30T07:38:48Z by fjb_saper
  • SystemAdmin
    SystemAdmin
    8523 Posts
    ACCEPTED ANSWER

    Re: Message payload compression in MQ V6.0

    ‏2012-12-14T00:44:35Z  in response to bmsiddesh
    MQ doesn't provide any options for compressing message data when it is put to a queue or JMS MQ provider, but you can use your own compression algorithm on the data (eg. RLE, ZLIB) and them put it as byte data rather than text data. The consuming application will then need to know how to uncompress it.

    Why do you need to do this? Do you have very large messages with sparse data? It could be more expensive or take longer to compress / uncompress data than to just send it in plain text through MQ.

    G.
    • bmsiddesh
      bmsiddesh
      4 Posts
      ACCEPTED ANSWER

      Re: Message payload compression in MQ V6.0

      ‏2012-12-14T07:15:58Z  in response to SystemAdmin
      Hi GBaddeley,

      Thanks for replay.
      Yes we are using ZLIB algorithm for compressing data before framing a JMS message. Our data is around 652 KB and it contains some images.
      But we are sending data as text message. In you replay i saw "put message as byte data rather than text data".

      What will be the difference of sending data in byte format rather than text format? Will it reduce the size or increase the performance?

      Regards,
      Siddesh
      • fjb_saper
        fjb_saper
        167 Posts
        ACCEPTED ANSWER

        Re: Message payload compression in MQ V6.0

        ‏2012-12-15T15:45:54Z  in response to bmsiddesh
        Byte or Text Message have nothing to do with performance per se.

        The important part you need to be aware of here is that when source and target use a different character set, a TextMessage gets converted by default whereas a BytesMessage stays as is...
  • fjb_saper
    fjb_saper
    167 Posts
    ACCEPTED ANSWER

    Re: Message payload compression in MQ V6.0

    ‏2012-12-30T07:38:48Z  in response to bmsiddesh
    You do not compress the message before putting it.
    You set up message compression on the channel.( SDR, SVRCONN, SVR, RCVR, RQSTR, CLNTCONN, CLUSRCVR)
    Be aware that there are some APARs out if you are not at the latest version of V6.