func (m *Module) SendAck(ctx context.Context, replyTo string, ack bool) error {
	msg := "ACK"
	if !ack {
		msg = "NACK"
	}
	return m.client.Publish(ctx, replyTo, msg).Err()
}
SendAck acknowledges the receipt of a message
package pubsub
import (
	"context"
	"encoding/json"
	"fmt"
	"time"
	"github.com/go-redis/redis/v8"
	"github.com/segmentio/ksuid"
	"github.com/spaceuptech/space-cloud/gateway/model"
	"github.com/spaceuptech/space-cloud/gateway/utils"
)
func (m *Module) Send(ctx context.Context, topic string, value interface{}) error {
	replyTo := m.getTopicName(ksuid.New().String())
	pubsub := m.client.Subscribe(context.TODO(), replyTo)
	defer utils.CloseTheCloser(pubsub)
	if _, err := pubsub.Receive(ctx); err != nil {
		return err
	}
	data, err := json.Marshal(model.PubSubMessage{ReplyTo: replyTo, Payload: value})
	if err != nil {
		return err
	}
	if err := m.client.Publish(ctx, m.getTopicName(topic), string(data)).Err(); err != nil {
		return err
	}
	msg, err := pubsub.ReceiveMessage(ctx)
	if err != nil {
		return err
	}
	if msg.Payload != "ACK" {
		return fmt.Errorf("invalid response received in redis send - %s", msg.Payload)
	}
	return nil
}