The ActiveBlaze Message type

Features > ActiveMQ Classic Real Time > The ActiveBlaze Message type

The foundation of message and event parsing in ActiveBlaze is the BlazeMessage.
A BlazeMessage is a a Map of key value pairs, where the keys are strings and the values are primitive objects.

The values supported are:

  • byte
  • bytes[]
  • char
  • short
  • int
  • long
  • float
  • double
  • Map (supports recursion)

You can create a BlazeMessage by its default constructor - e.g.

import org.apache.activeblaze.*;

BlazeMessage msg = new BlazeMessage();

There’s a few utility methods to support passing around standard objects - e.g.

import org.apache.activeblaze.*;

BlazeMessage msg = new BlazeMessage("test string");
String text = msg.getText();

BlazeMessage msg = new BlazeMessage();
msg.setText("test string");
String text = msg.getText();


byte[] data = getSomeData();
BlazeMessage msg = new BlazeMessage(data);
byte[] result  = msg.getBytes();

BlazeMessage msg = new BlazeMessage();
byte[] result = msg.getData();


Date date = new Date();
BlazeMessage msg = new BlazeMessage(date);
Date result = msg.getObject();

BlazeMessage msg = new BlazeMessage();
Object result = msg.getObject();

Apache, ActiveMQ, Apache ActiveMQ, the Apache feather logo, and the Apache ActiveMQ project logo are trademarks of The Apache Software Foundation. Copyright © 2024, The Apache Software Foundation. Licensed under Apache License 2.0.