update
Some checks failed
Build and Publish / BuildAndDeploy (push) Successful in 3m13s
Build and Publish / BuildAndDeployAmd64 (push) Has been cancelled

This commit is contained in:
matst80
2025-04-18 19:04:39 +02:00
parent 01a64c1fd1
commit ef9d191625
2 changed files with 5 additions and 5 deletions

View File

@@ -6,7 +6,7 @@ import (
amqp "github.com/rabbitmq/amqp091-go"
)
type RabbitTransportMaster struct {
type AmqpOrderHandler struct {
Url string
connection *amqp.Connection
//channel *amqp.Channel
@@ -16,7 +16,7 @@ const (
topic = "order-placed"
)
func (t *RabbitTransportMaster) Connect() error {
func (t *AmqpOrderHandler) Connect() error {
conn, err := amqp.DialConfig(t.Url, amqp.Config{
//Vhost: "/",
@@ -58,13 +58,13 @@ func (t *RabbitTransportMaster) Connect() error {
return nil
}
func (t *RabbitTransportMaster) Close() error {
func (t *AmqpOrderHandler) Close() error {
log.Println("Closing master channel")
return t.connection.Close()
//return t.channel.Close()
}
func (t *RabbitTransportMaster) OrderCompleted(data []byte) error {
func (t *AmqpOrderHandler) OrderCompleted(data []byte) error {
ch, err := t.connection.Channel()
if err != nil {
return err