Skip to content

Conversation

@Hidayathamir
Copy link

Simplify call kafka producer.

from

	if c.AddressProducer != nil {
		event := converter.AddressToEvent(address)
		if err := c.AddressProducer.Send(event); err != nil {
			c.Log.WithError(err).Error("failed to publish address updated event")
			return nil, fiber.ErrInternalServerError
		}
		c.Log.Info("Published address updated event")
	} else {
		c.Log.Info("Kafka producer is disabled, skipping address updated event")
	}

to

	event := converter.AddressToEvent(address)
	if err := c.AddressProducer.Send(event); err != nil {
		c.Log.WithError(err).Error("failed to publish address updated event")
		return nil, fiber.ErrInternalServerError
	}

@Reannn22
Copy link

Lgtm

@khannedy
Copy link
Owner

khannedy commented Oct 21, 2025

hi @Hidayathamir kakfa producer check must exists to make sure we can disabled kafka producer using configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants