prefix instead of suffix routing key

This commit is contained in:
Lucas Rouckhout
2023-02-18 16:39:46 +01:00
parent 90929134cb
commit 6f63758ab1

View File

@@ -73,7 +73,7 @@ func (svc *LndhubService) StartRabbitMqPublisher(ctx context.Context) error {
} }
func (svc *LndhubService) publishInvoice(ctx context.Context, invoice models.Invoice, ch *amqp.Channel) { func (svc *LndhubService) publishInvoice(ctx context.Context, invoice models.Invoice, ch *amqp.Channel) {
key := fmt.Sprintf("%s.%s.invoice", invoice.Type, invoice.State) key := fmt.Sprintf("invoice.%s.%s", invoice.Type, invoice.State)
user, err := svc.FindUser(context.Background(), invoice.UserID) user, err := svc.FindUser(context.Background(), invoice.UserID)
if err != nil { if err != nil {