13.6. 使用示例:

  • PUT 是一个带有 1 秒的 TTL 的元素:

    FluentProducerTemplate.on(context)
        .withHeader(AtomixClientConstants.RESOURCE_ACTION, AtomixMap.Action.PUT)
        .withHeader(AtomixClientConstants.RESOURCE_KEY, key)
        .withHeader(AtomixClientConstants.RESOURCE_TTL, "1s")
        .withBody(val)
        .to("direct:start")
        .send();