public class Event extends Object implements Serializable
| Constructor and Description |
|---|
Event() |
Event(String topic,
String content) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
broadcast()
是否广播的
|
Event |
broadcast(boolean broadcast)
设置广播的
|
String |
channel()
获取通道:用于同时支持多个消息队列框架,区分通道
|
Event |
channel(String channel)
设置通道
|
String |
content()
获取内容
|
String |
group()
获取分组
|
Event |
group(String group)
设置分组
|
String |
key()
获取事件键
|
Event |
key(String key)
设置事件键
|
int |
qos()
获取质量:0 只发一次;1 最少发一次;2 发一次并且不重复;(兼容mqtt,kafka)
|
Event |
qos(int qos)
设置质量
|
boolean |
retained()
是否保留的:是否保留最后一条(兼容mqtt)
|
Event |
retained(boolean retained)
设置保留的
|
Date |
scheduled()
获取预定执行时间(派发时专用)
|
Event |
scheduled(Date scheduled)
设置预定执行时间
|
String |
tags()
获取检索标签
|
Event |
tags(String tags)
设置检索标签
|
int |
times()
获取已派发次数(接收时专用)
|
Event |
times(int times)
设置已派发次数
|
String |
topic()
获取主题
|
String |
toString() |
EventTran |
tran()
获取事务
|
Event |
tran(EventTran tran)
配置事务
|
public EventTran tran()
public String topic()
public String content()
public String key()
public String tags()
public Date scheduled()
public int times()
public Event times(int times)
public int qos()
public Event qos(int qos)
public boolean retained()
public Event retained(boolean retained)
public boolean broadcast()
public Event broadcast(boolean broadcast)
public String group()
public String channel()
Copyright © 2025. All rights reserved.