Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note that serializable Java types are also supported for sending and receiving events but are strongly discouraged as they are not interoperable and incur a significant performance penalty.

Accessing Headers

It is possible for a consumer to access a header (ZeroMQ frame) by declaring a two dimensional byte array as a parameter type on the consumer method:

Code Block
languagejava
public class Gateway {
    ...
 
    @Consumer
    public void onPrice(byte[] header, byte[] serialized) {
       ...
    }
} 

This is useful when receiving messages from external ZeroMQ publishes that send multi-frame messages.