141.4. 主题使用者 -("hazelcast-topic:foo"

主题使用者仅提供一个操作(接收方)。此组件应该支持多个消耗,因为涉及主题时,您可以自由地拥有与同一 hazelcast 主题相关的客户。

fromF("hazelcast-%sfoo", HazelcastConstants.TOPIC_PREFIX)
  .choice()
    .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.RECEIVED))
      .log("...message received")
    .otherwise()
      .log("...this should never have happened")