7 Commits

Author SHA1 Message Date
kct949
90b3c0a407
Pt/finish kafka (#5)
* Add kafka eventbus to Catalog, Ordering and Payment.

Only catalog is confirmed to work, I think the ordering background
service and payment are still subscribing to rabbitMQ for some reason
(needs more investigation)

* Fix kafka consumer group ids.

* Fix build problems (duplicate package + lower version)

All services seem to use Kafka now, but it seems like
kafka takes to long to start up and the services
fail to connect to the borkers (either we have to do
retries similar like rabbitmq) or we are going to
enforce the execution order in docker compose by
using something like healthchecks.

* Add kafka broker dependency for other services.

Still have bug in eventBus subscription because
for example the ordering service should
handle a UserCheckoutAccepted event put it does have
no subscription for it when such an event is
published to the Kafka topic:

```
src-ordering-api-1              | [15:04:42 WRN] No subscription for Kafka event: UserCheckoutAccepted
src-ordering-api-1              | Consumed event: UserCheckoutAccepted
src-ordering-api-1              |  Content: 632B63DB0CE145D499FE01904F76A475
```

* Add logging for subscription manager problem.

Seems like the subscription manager is not used
correctly in the kafka eventbus (two different objects?).

* add printing handlers

* actually trigger printing handlers

* add kafkapersistentconnection registration

* Revert "add kafkapersistentconnection registration"

This reverts commit 704ee3e36f09f3f3ad48057de31996654a8e3894.

* add allowAutoCreateTopics in consumers (different than default) and in producers (just to be explicit)

* register DefaultKafkaPersistentConnection in ordering.backgroundtasks

* remove noise in logs

* Make eventNames in kafka eventbus consistent.

Do not remove IntegrationEventSuffix, before this
change the subscription handlers and eventNames did not match.

* Create kafka admin background service to create empty topic.

We have to create the eshop_event_bus kafka topic on startup,
because otherwise the consumer of the microservices would fail.

---------

Co-authored-by: Philipp Theyssen <p.theyssen@gmail.com>
Co-authored-by: Philipp Theyssen <34607877+PTheyssen@users.noreply.github.com>
2023-03-15 12:00:20 +01:00
Tarun Jain
3a03508f8a minor fixes 2022-12-02 02:01:14 +05:30
Wenjie Yu(MSFT)
c357aeac63
Update ServiceBus sdk from t1 to t2 (#1698)
* Update ServiceBus to the new SDKs.

* resolve errors

* resolve errors

* update codes

* update codes

* add a call in constructor

* remove changes

* add Dispose() menthod in interface

* Update codes

* update the method to get topicName

* Remove invalid changes

* resolve the errors in service

* fix issue

* fix issue

* update code

Co-authored-by: zedy <zedy@wicresoft.com>
2021-10-26 15:09:15 +05:30
Roman Marusyk
9b1a08a761
Service Bus persisted connection for ISubscriptionClient (#1521) 2021-03-09 15:32:28 +05:30
Miguel Veloso
a77b158d43 Add back looging to Seq and Logstash 2019-12-18 13:47:15 +00:00
Erik Pique
0988dcd8c2 background 2019-08-07 09:28:08 +02:00
Erik Pique
56f3a6b82e move background task 2019-08-06 16:10:39 +02:00