From 3a6a62fb7ce71d237ab473115e6d93202103dcdf Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 13 Dec 2024 18:01:47 -0800 Subject: [PATCH] nats: periods and underscores are forbidden and cause silent failure --- pkg/service/submissions.go | 4 ++-- validation/src/message_handler.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/service/submissions.go b/pkg/service/submissions.go index 3a6deb4..ce14685 100644 --- a/pkg/service/submissions.go +++ b/pkg/service/submissions.go @@ -313,7 +313,7 @@ func (svc *Service) ActionSubmissionTriggerPublish(ctx context.Context, params a return err } - svc.Nats.Publish("maptest.submissions.publish.new", []byte(j)) + svc.Nats.Publish("maptest.submissions.publishnew", []byte(j)) } else { // this is a map fix publish_fix_request := model.PublishFixRequest{ @@ -328,7 +328,7 @@ func (svc *Service) ActionSubmissionTriggerPublish(ctx context.Context, params a return err } - svc.Nats.Publish("maptest.submissions.publish.fix", []byte(j)) + svc.Nats.Publish("maptest.submissions.publishfix", []byte(j)) } return nil diff --git a/validation/src/message_handler.rs b/validation/src/message_handler.rs index 514d3b8..a15162e 100644 --- a/validation/src/message_handler.rs +++ b/validation/src/message_handler.rs @@ -39,8 +39,8 @@ impl MessageHandler{ let message=message_result.map_err(HandleMessageError::Messages)?; message.double_ack().await.map_err(HandleMessageError::DoubleAck)?; match message.subject.as_str(){ - "maptest.submissions.publish.new"=>self.publish_new.publish(message).await.map_err(HandleMessageError::PublishNew), - "maptest.submissions.publish.fix"=>self.publish_fix.publish(message).await.map_err(HandleMessageError::PublishFix), + "maptest.submissions.publishnew"=>self.publish_new.publish(message).await.map_err(HandleMessageError::PublishNew), + "maptest.submissions.publishfix"=>self.publish_fix.publish(message).await.map_err(HandleMessageError::PublishFix), "maptest.submissions.validate"=>self.validator.validate(message).await.map_err(HandleMessageError::Validation), other=>Err(HandleMessageError::UnknownSubject(other.to_owned())) }