MQ Browse Option

The MQ Connector now supports the ability to browse message by certain value instead of correlation id.

In order to use this ability, follow the following steps:

  1. The output-queue matching strategy must be set to BROWSE in the application.yml , as such:

    ol: mq: project: [orchestrated-key]: output-queue-strategy: BROWSE

    When not set the default behavior would be matching by correlation Id.

  2. The Entity would need to specify the location, which consists of the start position and length , of the data that need to be matched.
    Example:

    @RpcEntity(name = "Itemde") @RpcActions(actions = { @Action(action = EXECUTE.class, displayName = "Execute", alias = "execute", path = "ITEMDET ", actionProperties = { @ActionProperty(name = MqBeanNames.CORRELATION_ID_START_POSITION, value = "0"), @ActionProperty(name = MqBeanNames.CORRELATION_ID_LENGTH, value = "16")})}) public class Itemde implements org.openlegacy.core.rpc.RpcEntity { ... }
  3. Finally, a match value would need to be passed in runtime using action properties, as such:

    RpcAction execute = RpcActions.execute(); Map<String, String> properties = new HashMap<>(); properties.put(MqBeanNames.CORRELATION_ID, "Kid Guitar"); execute.addRunTimeProperties(properties); rpcSession.doAction(execute, entity);