类 EmqxWebhookToEventFlowConfiguration
Description: Emqx Webhook Client相关事件消息转 ApplicationEvent Flow 配置
通过 Emqx Webhook 方式获取到的 Emqx 客户端订阅事件消息。
$events/message_delivered - 消息投递事件 WebhookMessageDeliveredEvent
$events/message_acked - 消息确认事件 WebhookMessageAckedEvent
$events/message_dropped - 消息在转发的过程中被丢弃事件 WebhookMessageDroppedEvent
$events/delivery_dropped - 消息在投递的过程中被丢弃事件 WebhookDeliveryDroppedEvent
$events/client_connected - 客户端连接成功事件 WebhookClientConnectedEvent
$events/client_disconnected- 客户端连接断开事件 WebhookClientDisconnectedEvent
$events/client_connack - 连接确认事件 WebhookClientConnectAckEvent
$events/client_check_authz_complete - 鉴权完成事件 WebhookClientCheckAuthenticationCompleteEvent
$events/session_subscribed - 客户端订阅成功事件 WebhookSessionSubscribedEvent
$events/session_unsubscribed- 客户端取消订阅成功事件 WebhookSessionUnsubscribedEvent
这些消息内容为 JSON 类型,将其转成对应的实体,然后将这些实体放入到对应的 ApplicationEvent 发送出去。 相关应用代码,进需要监听具体的 ApplicationEvent 即可以完成相关的实现。进一步简化操作。
- 作者:
- : gengwei.zheng
- Date:
- : 2023/11/28 18:05
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明org.springframework.integration.event.outbound.ApplicationEventPublishingMessageHandlerSpring Integration ApplicationEvent 出站消息配置org.springframework.messaging.MessageChannelEmqx Webhook Http 入站通道org.springframework.integration.dsl.IntegrationFlowemqxWebhookToEventFlow(org.springframework.integration.event.outbound.ApplicationEventPublishingMessageHandler emqxWebhookEventPublishingMessageHandler, org.springframework.messaging.MessageChannel emqxWebhookHttpInboundChannel) Emqx Webhook 事件转成系统 Event Flowvoid
-
构造器详细资料
-
EmqxWebhookToEventFlowConfiguration
public EmqxWebhookToEventFlowConfiguration()
-
-
方法详细资料
-
postConstruct
@PostConstruct public void postConstruct() -
emqxWebhookHttpInboundChannel
@Bean("emqxDefaultWebhookHttpInboundChannel") public org.springframework.messaging.MessageChannel emqxWebhookHttpInboundChannel()Emqx Webhook Http 入站通道- 返回:
QueueChannel
-
emqxWebhookEventPublishingMessageHandler
@Bean public org.springframework.integration.event.outbound.ApplicationEventPublishingMessageHandler emqxWebhookEventPublishingMessageHandler()Spring Integration ApplicationEvent 出站消息配置- 返回:
ApplicationEventPublishingMessageHandler
-
emqxWebhookToEventFlow
@Bean public org.springframework.integration.dsl.IntegrationFlow emqxWebhookToEventFlow(org.springframework.integration.event.outbound.ApplicationEventPublishingMessageHandler emqxWebhookEventPublishingMessageHandler, @Qualifier("emqxDefaultWebhookHttpInboundChannel") org.springframework.messaging.MessageChannel emqxWebhookHttpInboundChannel) Emqx Webhook 事件转成系统 Event Flow- 参数:
emqxWebhookEventPublishingMessageHandler-ApplicationEventPublishingMessageHandler- 返回:
IntegrationFlow
-
webhookDemoListener
-