Sent from my iPhone

> On Jan 5, 2022, at 8:10 PM, Haiting Jiang <jianghait...@apache.org> wrote:
> 
> 
>>  CompletableFuture<MessageId> trigger(SystemEventMessage message);
> 
> Maybe `record` make more sense? 
> 
>>  SystemEventMessageBuilder properties(Map<String,Object> properties);
>> 
>>  SystemEventMessageBuilder addProperty(String key, Object value);
> 
> How to handle  the serialization and deserialization if the value type is 
> Object?  
> 
>> - [ ] Producer publish
>> - [ ] Message delivered
>> - [ ] Message acked
> 
> I think we don't need to record normal message producing and consuming event? 
> That would make the system topic store too much data.

These bother me too. Producer and consumers can accomplish the same use cases 
in their application logic.

Any notification mechanism must be very lightweight. What is the implantation 
plan?

Also if this pip is for user use cases then there needs to be isolation at the 
tenant level.

Thanks for the proposal.

Regards,
Dave

> 
> 
>> On 2022/01/05 15:27:33 mattison chao wrote:
>> Original PIP : https://github.com/apache/pulsar/issues/13628
>> 
>> Pasted bellow for quoting convenience.
>> 
>> —— 
>> 
>> ## Motivation
>> 
>> In some case or for better observability. We can support Pulsar event 
>> notification mechanism, that can let user subscribe this system topic to 
>> receive some **"we need notice to user"** event.
>> 
>> ## Goal
>> 
>> Enable users to receive Pulsar system event.
>> 
>> ## API Changes
>> 
>> 1. Add config ``pulsarSystemEventEnabled``
>> 
>> ```java
>> pulsarSystemEventEnabled=false
>> ```
>> 2. Add ``SystemEventMessageBuilder``
>> ```java
>> 
>> 
>> public interface SystemEventMessageBuilder {
>> 
>>  SystemEventMessageBuilder eventType(SystemEvent event);
>> 
>>  SystemEventMessageBuilder properties(Map<String,Object> properties);
>> 
>>  SystemEventMessageBuilder addProperty(String key, Object value);
>> 
>>  SystemEventMessage build();
>> 
>> }
>> 
>> ```
>> 3. Add ``SystemEventService``
>> 
>> ```java
>> 
>> public interface SystemEventService {
>> 
>>  void init();
>> 
>>  CompletableFuture<MessageId> trigger(SystemEventMessage message);
>> 
>>  void close();
>> }
>> 
>> ```
>> 
>> ## Implementation
>> 
>> This PIP just is a simple version, it's purpose is to discuss what event we 
>> need to trigger? how to trigger? and what is the event message structure.
>> 
>> I think we need to trigger some event as bellow:
>> 
>> - [ ] Client connected
>> - [ ] Client disconnected
>> - [ ] Consumer subscribe
>> - [ ] Consumer unsubscribe
>> - [ ] Producer publish
>> - [ ] Message delivered
>> - [ ] Message acked
>> 
>> These are far from enough, and we need to continue to make supplements here.
>> Please fell free to give me more advice for this PIP.
>> 
>> ## Reject Alternatives
>> 
>> none.
>> 
>> Thanks,
>> Mattisonchao
> 
> Thanks,
> Haiting Jiang

Reply via email to