// PublishDID publishes the DID to the queue for processing.
PublishDID publishes the DID to the queue for processing.
// PublishDID publishes the DID to the queue for processing .
func (h *PubSub) PublishDID(did string) error {
	if h.State() != lifecycle.StateStarted {
		return lifecycle.ErrNotStarted
	}
	payload, err := h.jsonMarshal(did)
	if err != nil {
		return fmt.Errorf("publish DID: %w", err)
	}
	msg := message.NewMessage(watermill.NewUUID(), payload)
	logger.Debugf("Publishing DIDs to topic [%s]: %s", didTopic, did)
	return h.publisher.Publish(didTopic, msg)
}
func ( h * PubSub ) PublishDID ( did string ) error { if h . State ( ) != lifecycle . StateStarted { return lifecycle . ErrNotStarted } payload , err := h . jsonMarshal ( did ) if err != nil { return fmt . Errorf ( " " , err ) } msg := message . NewMessage ( watermill . NewUUID ( ) , payload ) logger . Debugf ( " " , didTopic , did ) return h . publisher . Publish ( didTopic , msg ) }
PublishDID publishes the DID to the queue for processing.
PublishDID publishes the DID to the queue for processing .