Skip to content

DSL improvements for broker-backed pub/sub channels. #3192

@garyrussell

Description

@garyrussell

Core (in-memory) pub/sub channels can be configured with in-line subscriptions:

.publishSubscribeChannel(c -> c
		.subscribe(sf -> sf.handle(
				kafkaMessageHandler(producerFactory(), TEST_TOPIC1)
						.timestampExpression("T(Long).valueOf('1487694048633')"),
				e -> e.id("kafkaProducer1")))
		.subscribe(sf -> sf.handle(
				kafkaMessageHandler(producerFactory(), TEST_TOPIC2)
						.timestamp(m -> 1487694048644L),
				e -> e.id("kafkaProducer2")))
)

Message broker-backed pub/sub channels have the same semantics as in-memory pub/sub in an application generally (distribution to multiple subscribers) but there is no support for in-line subscriptions in the DSL.

It may be difficult/impossible to support but we should at least explore the possibility.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions