activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael André Pearce <michael.andre.pea...@me.com>
Subject Re: [DISCUSS] Custom Object Serialisation Support
Date Wed, 31 May 2017 02:08:15 GMT
Or even (as we use address now)

> byte[] serialize(String address, Object o)
> 
> Object deserialize(String address, byte[] bytes)



Sent from my iPhone

> On 31 May 2017, at 03:00, Michael André Pearce <michael.andre.pearce@me.com> wrote:
> 
> Hi Matt,
> 
> I think having just a SerDe interface for payload handling separate from a general interceptor
/ client side plugin, is beneficial as then it keeps the logic for serialsation well encapsulated.
And also cleaner if we need to do anything (eg sending it as a bytesmessags with a header
flag)
> 
> I see this very much like difference in kafka where you have payload serialisation (serdes)
and custom-plugin (interceptors)
> 
> Also having just a serde makes interface for people to implement and care about much
simpler. Eg this is almost the interface I would expect:
> 
> byte[] serialize(Destination destination, Object o)
> 
> Object deserialize(Destination destination, byte[] bytes)
> 
> Nice and simple to implement without having to care about anything else.
> 
> Cheers
> Mike
> 
> 
> Sent from my iPhone
> 
>> On 30 May 2017, at 23:18, Matt Pavlovich <mattrpav@gmail.com> wrote:
>> 
>> Michael-
>> 
>> +1 dealing with bytes messages is preferred to object messages and custom object
SerDes is super useful.
>> 
>> What do you think about considering a generic client-side plugin approach vs just
a payload handler? 
>> 
>>> On May 30, 2017, at 4:03 PM, Michael André Pearce <michael.andre.pearce@me.com>
wrote:
>>> 
>>> If present then this would be used to serialise the Object instead of the default,
and subsequently create/convert to a BytesMessage, with a header set to denote it was custom
serialised.
>> 

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message