func (b *PubSubBroker) Publish() Handler {
	return HandlerFunc(func(w resp.ResponseWriter, c *resp.Command) {
		if c.ArgN() != 2 {
			w.AppendError(WrongNumberOfArgs(c.Name))
			return
		}

		n := b.PublishMessage(c.Arg(0).String(), c.Arg(1).String())
		w.AppendInt(n)
	})
}
// Publish acts as a publish handler
Publish acts as a publish handler
// Publish acts as a publish handler
func (b *PubSubBroker) Publish() Handler {
	return HandlerFunc(func(w resp.ResponseWriter, c *resp.Command) {
		if c.ArgN() != 2 {
			w.AppendError(WrongNumberOfArgs(c.Name))
			return
		}
		n := b.PublishMessage(c.Arg(0).String(), c.Arg(1).String())
		w.AppendInt(n)
	})
}
func ( b * PubSubBroker ) Publish ( ) Handler { return HandlerFunc ( func ( w resp . ResponseWriter , c * resp . Command ) { if c . ArgN ( ) != 2 { w . AppendError ( WrongNumberOfArgs ( c . Name ) ) return } n := b . PublishMessage ( c . Arg ( 0 ) . String ( ) , c . Arg ( 1 ) . String ( ) ) w . AppendInt ( n ) } ) }
Publish acts as a publish handler
Publish acts as a publish handler