fhmq / hmq

High performance mqtt broker
Apache License 2.0
1.32k stars 273 forks source link

[Feature Proposal] allow bridgemq to cost the message #159

Closed shoothzj closed 2 years ago

shoothzj commented 2 years ago

allow bridgemq to cost the message

suggest implementation

add bool return value on Publish method to allow bridge mq to cost the message

type BridgeMQ interface {
    Publish(e *Elements) (bool, error)
}

If the bridgeMq returns true, we won't send msg to it's subscriber

@chowyu08 Please take a look, if you approve that, I am willing and happy to submit a PR