]> juplo.de Git - demos/kafka/chat/log
demos/kafka/chat
2 weeks agotest: Imported refined pact from consumer backend
Kai Moritz [Sat, 11 Oct 2025 22:14:26 +0000 (00:14 +0200)]
test: Imported refined pact from consumer

2 weeks agotest: Implemented a test for the pact with the frontend
Kai Moritz [Sat, 11 Oct 2025 13:58:42 +0000 (15:58 +0200)]
test: Implemented a test for the pact with the frontend

2 weeks agofeat: Introduces `ChatHomeService.remove(UUID)` (untested!)
Kai Moritz [Sat, 11 Oct 2025 17:25:59 +0000 (19:25 +0200)]
feat: Introduces `ChatHomeService.remove(UUID)` (untested!)

* The introduced method is needed to setup/reset the state in the pact-test
* Therefore, it is only implemented for the implementation `in-memory`

19 months agotest: refactor: Refined naming of `ChatHomeServiceIT` -- ALIGN
Kai Moritz [Mon, 25 Mar 2024 23:01:49 +0000 (00:01 +0100)]
test: refactor: Refined naming of `ChatHomeServiceIT` -- ALIGN

19 months agotest: refactor: Refined naming of `ChatHomeServiceIT` -- MOVE
Kai Moritz [Mon, 25 Mar 2024 23:01:05 +0000 (00:01 +0100)]
test: refactor: Refined naming of `ChatHomeServiceIT` -- MOVE

19 months agorefactor: Moved the ``StorageStrategyIT`` into package ``storage`` -- ALIGN
Kai Moritz [Mon, 25 Mar 2024 21:17:53 +0000 (22:17 +0100)]
refactor: Moved the ``StorageStrategyIT`` into package ``storage`` -- ALIGN

19 months agorefactor: Moved the ``StorageStrategyIT`` into package ``storage`` -- MOVE
Kai Moritz [Mon, 25 Mar 2024 21:17:22 +0000 (22:17 +0100)]
refactor: Moved the ``StorageStrategyIT`` into package ``storage`` -- MOVE

19 months agotest: GREEN - fix: Removed the unnecessary ``@DirtiesContext``
Kai Moritz [Mon, 25 Mar 2024 21:58:39 +0000 (22:58 +0100)]
test: GREEN - fix: Removed the unnecessary ``@DirtiesContext``

* The annotation disturbed the test-execution.
* Strangly enough, the annotation disturbed the test-execution only after
  the refactoring.

19 months agorefactor: RED - Moved ``ConfigurationIT`` into ``implementation`` -- ALIGN
Kai Moritz [Mon, 25 Mar 2024 21:14:04 +0000 (22:14 +0100)]
refactor: RED - Moved ``ConfigurationIT`` into ``implementation`` -- ALIGN

19 months agorefactor: Moved the ``ConfigurationIT`` into ``implementation`` -- MOVE
Kai Moritz [Mon, 25 Mar 2024 21:12:57 +0000 (22:12 +0100)]
refactor: Moved the ``ConfigurationIT`` into ``implementation`` -- MOVE

19 months agorefactor: Moved the ``HandoverIT``-tests into the ``api``-package -- ALIGN
Kai Moritz [Mon, 25 Mar 2024 21:09:22 +0000 (22:09 +0100)]
refactor: Moved the ``HandoverIT``-tests into the ``api``-package -- ALIGN

19 months agorefactor: Moved the ``HandoverIT``-tests into the ``api``-package -- MOVE
Kai Moritz [Mon, 25 Mar 2024 21:07:34 +0000 (22:07 +0100)]
refactor: Moved the ``HandoverIT``-tests into the ``api``-package -- MOVE

19 months agotest: refactor: Cleand up - removed unused imports/variables/annotations
Kai Moritz [Mon, 25 Mar 2024 21:54:08 +0000 (22:54 +0100)]
test: refactor: Cleand up - removed unused imports/variables/annotations

19 months agotest: refactore: `@SpringBootTest` configures the port automatically
Kai Moritz [Mon, 25 Mar 2024 21:50:30 +0000 (22:50 +0100)]
test: refactore: `@SpringBootTest` configures the port automatically

19 months agofix: ShardNotOwnedException must map to "503 - Service Unavailable"
Kai Moritz [Wed, 20 Mar 2024 08:57:15 +0000 (09:57 +0100)]
fix: ShardNotOwnedException must map to "503 - Service Unavailable"

19 months agofix: GREEN - Postponed the resetting of the sink
Kai Moritz [Sun, 24 Mar 2024 19:34:07 +0000 (20:34 +0100)]
fix: GREEN - Postponed the resetting of the sink

* The completion of a sink of an instance of `ChatRoomData`, that belongs
  to a revoked partition is postponed until the following partition-
  assignment happens.
* Also, the sink is only completed and recreated, if the partition it
  belongs to, was not assigned to the instance during
  `onPartitionsAssigned()` again.
* That way, listeners have a little more time to receive the messages, that
  were send shortly prior to the deactivation, and are not disturbed
  unnecessarily, if the partition is reassigned to the same instance again.
* *TODO:* Listeners still have to be enabled, to start listening on the
  responsible instance where they left of on the old instance, if they
  were to slow to receive all messages, before the sind was completed.

19 months agotest: HandoverIT - RED - Started a third backend
Kai Moritz [Thu, 14 Mar 2024 21:48:24 +0000 (22:48 +0100)]
test: HandoverIT - RED - Started a third backend

19 months agotest: HandoverIT-POC: Minor fixes (`User#hashCode()`, `#toString()`)
Kai Moritz [Mon, 25 Mar 2024 08:58:53 +0000 (09:58 +0100)]
test: HandoverIT-POC: Minor fixes (`User#hashCode()`, `#toString()`)

19 months agorefactor: `ChatMessageService` knows its corresponding `ChatRoomInfo`
Kai Moritz [Sun, 24 Mar 2024 13:47:43 +0000 (14:47 +0100)]
refactor: `ChatMessageService` knows its corresponding `ChatRoomInfo`

19 months agotest: HandoverIT-POC - Enabled logging for backends (level: DEBUG)
Kai Moritz [Sun, 17 Mar 2024 11:11:50 +0000 (12:11 +0100)]
test: HandoverIT-POC - Enabled logging for backends (level: DEBUG)

19 months agorefactor: Only `ChannelMediator#chatRoomCreated()` creates `ChatRoomData`
Kai Moritz [Sat, 23 Mar 2024 15:33:13 +0000 (16:33 +0100)]
refactor: Only `ChannelMediator#chatRoomCreated()` creates `ChatRoomData`

19 months agofeat: The publishing of the owernship is retried, if it fails
Kai Moritz [Sat, 23 Mar 2024 12:24:43 +0000 (13:24 +0100)]
feat: The publishing of the owernship is retried, if it fails

19 months agofix: GREEN - Loading finishes, if info-topic is empty
Kai Moritz [Sun, 24 Mar 2024 08:51:45 +0000 (09:51 +0100)]
fix: GREEN - Loading finishes, if info-topic is empty

19 months agotest: RED - Added IT for application-startup, if no data is available
Kai Moritz [Sun, 24 Mar 2024 10:35:07 +0000 (11:35 +0100)]
test: RED - Added IT for application-startup, if no data is available

19 months ago test: Refined `KafkaConfigurationIT` (info-topic is really loaded)
Kai Moritz [Sun, 24 Mar 2024 10:50:37 +0000 (11:50 +0100)]
 test: Refined `KafkaConfigurationIT` (info-topic is really loaded)

19 months agotest: HandoverIT-POC - GREEN: The `TestListener` automatically reconnects
Kai Moritz [Mon, 11 Mar 2024 17:32:46 +0000 (18:32 +0100)]
test: HandoverIT-POC - GREEN: The `TestListener` automatically reconnects

* If a rebalance happens, an instances, that is no longer responsible
  for a specific chat-room, closes the connections to listeners of these
  chat-rooms.
* Hence, the `TestListener`, like the real frontend, will have to
  reconnect, if that happens, to be able to see newly send messages.

19 months agotest: HandoverIT-POC - RED - Started a second backend
Kai Moritz [Fri, 8 Mar 2024 08:14:14 +0000 (09:14 +0100)]
test: HandoverIT-POC - RED - Started a second backend

* A second backend is started, after the writers and the listener were
  instanciated.
* The test fails, because the listener does not see messages, that are
  send by the writers after the rebalance finishes.
* Also changed the durations, that the setup waits for newly
  started backend-instances.

19 months agotest: HandoverIT-POC: Adapted and reanabled the test
Kai Moritz [Wed, 20 Mar 2024 18:24:34 +0000 (19:24 +0100)]
test: HandoverIT-POC: Adapted and reanabled the test

19 months agofeat: Switched the config to `HaproxyDataPlaneApiShardingPublisherStrategy`
Kai Moritz [Wed, 20 Mar 2024 23:55:11 +0000 (00:55 +0100)]
feat: Switched the config to `HaproxyDataPlaneApiShardingPublisherStrategy`

19 months agofix: GREEN - Dynamic changes to the sharding-map are synced back to disk
Kai Moritz [Wed, 20 Mar 2024 21:02:09 +0000 (22:02 +0100)]
fix: GREEN - Dynamic changes to the sharding-map are synced back to disk

* HAProxy distinguishes managed and unmanaged maps.
** Only Maps, that are loaded from the directory `maps`, that lives in the
   config-directory of HAProxy, are treated as managed.
** Only managed maps are listed by default by the Data Plane API.
** And last but not least, only managed maps _can be synced back to disk_,
   which makes dynamically changes persistent, so that they can survive
   a restart or reload of HAProxy.
* And only managed maps can as well be referenced by their _name_, as by
  their id.
* The name of managed maps is the name of the file, _without_ the path and
  without the suffix `.map`.
* What makes it more difficulte in the case of the HAProxy running inside
  a docker-container is, that this mechanism only seems to work, if the
  config-directory is identical to the default `/etc/haproxy`, which _is
  not_ the case in the default-configuration of the used official image.
* Hence, changing the config-directory to the default (in this case)
  enables managed maps, which is crucial for the setup of the Handover-IT,
  whicht has to reload the HAProxy-process, in order to let it detect newly
  added backend-instances, that are otherwise ignored, because the name-
  resolution inside the docker-network only works _after_ an instance is
  started -- _without this change_, the dynamically made changes to the
  sharding-map are lost during the reload, that is performed shortly
  afterwards.
* The refined configuration for HAProxy enables the following refinements
  of the `HaproxyDataPlaneApiShardingPublisherStrategy`:
** Because the sharding-map is managed now, applied changes can be *synced
   back to disk* forcibly, which is not possible for unmanaged maps.
** That means: *Dynamically made changes persist a reload/restart!*
** Also, because the sharding-map is managed now, it can be simply
   referenced by its name `sharding`.
** Therefore, the `HaproxyDataPlaneApiShardingPublisherStrategyIT` does
   no longer have to detect the ID of the map to be able to reference it.

19 months agotest: RED - Updated keys must survive, if HAProxy reloads
Kai Moritz [Wed, 20 Mar 2024 22:02:22 +0000 (23:02 +0100)]
test: RED - Updated keys must survive, if HAProxy reloads

* The Handover-IT hast to signal HAProxy to reload, after a new backend was
  started for the first time.
* Otherwise, HAProxy is not able to detect newly started backend-instances,
  because with docker, the name of a backend cannot be resolved, before it
  is started.
* This test formulates the expectation, that dynamically added changes,
  that were applyed with the help of the Data Plane API, persist a reload.
* *The test fails*, because HAProxy restores all maps from disk, if it
  reloads, but the dynamically made changes are never synced back to disk.

19 months agofeat: Shard-ownership is published asynchronously
Kai Moritz [Tue, 19 Mar 2024 09:45:35 +0000 (10:45 +0100)]
feat: Shard-ownership is published asynchronously

19 months agotest: Implemented IT for `HaproxyDataPlaneApiShardingPublischerStrategy`
Kai Moritz [Wed, 20 Mar 2024 18:20:32 +0000 (19:20 +0100)]
test: Implemented IT for `HaproxyDataPlaneApiShardingPublischerStrategy`

* Enabled the HAProxy Data Plane API in the configuration, that is used
  for the tests that start an instance of HAProxy inside a container.

19 months agofeat: GREEN - Implemented `HaproxyDataPlaneApiShardingPublisherStrategy`
Kai Moritz [Mon, 18 Mar 2024 14:00:21 +0000 (15:00 +0100)]
feat: GREEN - Implemented `HaproxyDataPlaneApiShardingPublisherStrategy`

19 months agotest: RED - Expectations for `HaproxyDataPlaneApiShardingPublischerStrategy`
Kai Moritz [Mon, 18 Mar 2024 07:31:39 +0000 (08:31 +0100)]
test: RED - Expectations for `HaproxyDataPlaneApiShardingPublischerStrategy`

19 months agorefactor: Renamed `ShardingStrategy` for HAProxy Runtime API -- ALIGN
Kai Moritz [Sun, 17 Mar 2024 21:01:08 +0000 (22:01 +0100)]
refactor: Renamed `ShardingStrategy` for HAProxy Runtime API -- ALIGN

19 months agorefactor: Renamed `ShardingStrategy` for HAProxy Runtime API -- MOVE
Kai Moritz [Sun, 17 Mar 2024 21:00:08 +0000 (22:00 +0100)]
refactor: Renamed `ShardingStrategy` for HAProxy Runtime API -- MOVE

19 months agotest: HandoverIT-POC - FIX: writers/listeners must send the `X-shard`-header
Kai Moritz [Sun, 17 Mar 2024 09:48:17 +0000 (10:48 +0100)]
test: HandoverIT-POC - FIX: writers/listeners must send the `X-shard`-header

* `@Disabled` the Handover-IT temporarily, because the fix disclosed,
  that some fixes and refactorings are needed, before the IT can work
  again.
* That is, because the implemented `HaproxyShardingPublisherStrategy`
  does _not_ properly updates the sharding-map.

19 months agorefactor: Fixed a warning for events concerning `@EqualsAndHashCode`
Kai Moritz [Mon, 18 Mar 2024 07:35:20 +0000 (08:35 +0100)]
refactor: Fixed a warning for events concerning `@EqualsAndHashCode`

19 months agotest: HandoverIT-POC - the sharding-map is logged during backend-starts
Kai Moritz [Sun, 17 Mar 2024 08:42:02 +0000 (09:42 +0100)]
test: HandoverIT-POC - the sharding-map is logged during backend-starts

19 months agotest: HandoverIT-POC - `TestWriter` logs an error, if sending fails
Kai Moritz [Wed, 20 Mar 2024 17:02:18 +0000 (18:02 +0100)]
test: HandoverIT-POC - `TestWriter` logs an error, if sending fails

19 months agotest: HandoverIT-POC - logging the progress during the start of a backend
Kai Moritz [Sat, 16 Mar 2024 15:14:12 +0000 (16:14 +0100)]
test: HandoverIT-POC - logging the progress during the start of a backend

19 months agofeat: Implemented problem-details for `ChannelNotReadyException`
Kai Moritz [Sat, 16 Mar 2024 20:01:11 +0000 (21:01 +0100)]
feat: Implemented problem-details for `ChannelNotReadyException`

19 months agofeat: Implemented problem-details for `ChatRoomInactiveException`
Kai Moritz [Sat, 16 Mar 2024 19:58:19 +0000 (20:58 +0100)]
feat: Implemented problem-details for `ChatRoomInactiveException`

19 months agotest: HandoverIT-POC - FIX: `TestWriter` must use `Flux#concatMap()`
Kai Moritz [Fri, 15 Mar 2024 15:10:31 +0000 (16:10 +0100)]
test: HandoverIT-POC - FIX: `TestWriter` must use `Flux#concatMap()`

* `Flux#flatMap()` executes in parallel. Hence, the enqueued messages
  are _not_ send in the order, that they were enqueued.
* Therefore, the `TestWriter` was refactored to use `Flux#concatMap()`,
  which executes serially.

19 months agofix: `ChatRoomData` must only be activated after restoring completes
Kai Moritz [Thu, 14 Mar 2024 11:49:29 +0000 (12:49 +0100)]
fix: `ChatRoomData` must only be activated after restoring completes

19 months agofix: GREEN - Implemented activation/deactivation of `ChatRoomData`
Kai Moritz [Mon, 11 Mar 2024 12:08:21 +0000 (13:08 +0100)]
fix: GREEN - Implemented activation/deactivation of `ChatRoomData`

* Introduced `volatile ChatRoomData#active`, which initially is `false`.
* `ChatRoomData#listen()` throws `ChatRoomInactiveException` if inactive.
* `ChatRoomData#addMessage(..)` throws `ChatRoomInactiveException` if
  inactive.
* `SimpleChatHomeService` explicitly activates restored and newly created
  instances of `ChatRoomData`.
* `DataChannel` explicitly activates instances of `ChatRoomData`, if
  they are restored during partition-assignment or, if a new chat-room
  is created.
* `DataChannel` explicitly _deactivates_ instances of `ChatRoomData`,
  if the associated partition is revoked.
* Also: Introduced `ChatMessageService#getChatRoomId()`.

19 months agotest: RED - Formulated expectations for active vs. inactive `ChatRoomData`
Kai Moritz [Mon, 11 Mar 2024 10:59:50 +0000 (11:59 +0100)]
test: RED - Formulated expectations for active vs. inactive `ChatRoomData`

* Introduced the methods `ChatRoomData+activate()` and
  `ChatRoomData#deactivate()`.
* Added tests to `ChatRoomDataTest`, that assert the expectations.
* Added tests to `AbstractConfigurationIT`, that assert the expectations.

19 months agofix: GREEN - `ChatRoomData` obeys to the added expectations.
Kai Moritz [Sat, 9 Mar 2024 10:17:33 +0000 (11:17 +0100)]
fix: GREEN - `ChatRoomData` obeys to the added expectations.

* Switched `ChatRoomData` from a multicast- to a replay-sink.
* Before, listening was implemented with a multicast-sink, that enabled
  back-pressure.
* Now, it was refactored to use a replay-sink, that enables a (configurable)
  limitted replay.

19 months agotest: RED - Added test for multiple parallel Listeners to `ChatRoomDataTest`
Kai Moritz [Fri, 8 Mar 2024 17:10:43 +0000 (18:10 +0100)]
test: RED - Added test for multiple parallel Listeners to `ChatRoomDataTest`

* The test formulates the expectation, that late listeners should see all
  messages (for a reasonable long period before their subscriptions)
* The test _fails_, because the implementation only buffers messages for
  backpressure -- _not for replay!_

19 months agotest: Fixed `AbstractConfigurationIT#testPutMessageInNewChatRoom()`
Kai Moritz [Fri, 15 Mar 2024 15:04:38 +0000 (16:04 +0100)]
test: Fixed `AbstractConfigurationIT#testPutMessageInNewChatRoom()`

* In the case, that the request that adds a messag failed, the longly
  process of creating a new chat-room, until it has the correct shard,
  was unnecessarily repeated.
* Different workarounds have to be applied at the same time for the two
  implementations:
** Because `ShardedChatHomeService` only throws a `ShardNotOwnedException`,
   if the shard, that is picked by the strategy is not owned, the result
   is retried until the requests succeeds by chance.
** The `KafkaChatHomeService` always creates the chat-room in the
   partition, that is derived from the randomly picked id.
   Hence, the loop, that is only left, if the randomly picked partition
   matches the partition `2`, that the test-instance owns.
** Since `SimpleChatHomeService` does not know the concept of sharding
   at all, the loop is also left, if no shard is set (shard is ``null``).

19 months agotest: Refined `AbstractConfigurationIT#testPutMessageInNewChatRoom()`
Kai Moritz [Fri, 15 Mar 2024 10:58:59 +0000 (11:58 +0100)]
test: Refined `AbstractConfigurationIT#testPutMessageInNewChatRoom()`

* Removed unnecessary asserts: the expected result of the creation of a
  chat-room is no concern of this test.
* Simplified the assertion of the shard.

19 months agotest: Fixed `AbstractConfigurationIT#testPutMessageInNewChatRoom()`
Kai Moritz [Fri, 15 Mar 2024 10:18:29 +0000 (11:18 +0100)]
test: Fixed `AbstractConfigurationIT#testPutMessageInNewChatRoom()`

* The first request in the awaited assertion must create a chat-room,
  that is owned by the instance.
* Hence, _it has to_ assert, that the shard of the created chat-room is
  `2` - the only shard, the test-instance owns, or _empty_, if the instance
  under test does not implement sharding.

19 months agotest: Added tests for listening to `ChatRoomDataTest`
Kai Moritz [Fri, 8 Mar 2024 09:48:20 +0000 (10:48 +0100)]
test: Added tests for listening to `ChatRoomDataTest`

19 months agotest: Refactored `ChatRoomDataTest` - made mocking more clear
Kai Moritz [Fri, 8 Mar 2024 11:27:15 +0000 (12:27 +0100)]
test: Refactored `ChatRoomDataTest` - made mocking more clear

* When mocking the results of calls to `ChatMessageService`, the returned
  message does naturally _not_ reflect the parameters of the call.
* Hence, a arbitrary message is used whenever the test only asserts,
  that a value, that was returened by `ChatMessageService` is handed
  through as expected by `ChatRoomData`.

19 months agotest: Removed unnecessary Mockito-recordings in `ChatRoomDataTest`
Kai Moritz [Fri, 8 Mar 2024 11:24:52 +0000 (12:24 +0100)]
test: Removed unnecessary Mockito-recordings in `ChatRoomDataTest`

19 months agotest: `ChatRoomDataTest` verifies that persistence is triggered as expected
Kai Moritz [Fri, 8 Mar 2024 10:55:25 +0000 (11:55 +0100)]
test: `ChatRoomDataTest` verifies that persistence is triggered as expected

19 months agotest: Refactored `ChatRoomDataTest` - DRY for message attributes
Kai Moritz [Fri, 8 Mar 2024 10:01:23 +0000 (11:01 +0100)]
test: Refactored `ChatRoomDataTest` - DRY for message attributes

19 months agotest: HandoverIT-POC - Refactored `TestListener`
Kai Moritz [Mon, 11 Mar 2024 17:15:32 +0000 (18:15 +0100)]
test: HandoverIT-POC - Refactored `TestListener`

19 months agotest: HandoverIT-POC - Added logging for complete/error to listener
Kai Moritz [Mon, 11 Mar 2024 17:14:17 +0000 (18:14 +0100)]
test: HandoverIT-POC - Added logging for complete/error to listener

19 months agotest: HandoverIT-POC - Waiting for the assertion when all messages are sent
Kai Moritz [Thu, 7 Mar 2024 17:52:42 +0000 (18:52 +0100)]
test: HandoverIT-POC - Waiting for the assertion when all messages are sent

19 months agotest: HandoverIT-POC - Refactored the startup of backend-containers
Kai Moritz [Thu, 7 Mar 2024 16:43:30 +0000 (17:43 +0100)]
test: HandoverIT-POC - Refactored the startup of backend-containers

* The backend-containers are explicitly started during the test.
* When a backend is started, it is waited for, that the started backend
  reportes its status as `UP`, _and_, that alle writers are again able to
  send messages, afterwards.

19 months agorefactor: Simplified the configuration for the kafka-services
Kai Moritz [Wed, 6 Mar 2024 14:34:20 +0000 (15:34 +0100)]
refactor: Simplified the configuration for the kafka-services

* Removed class `ChannelTaskRunner` and `KafkaServicesApplicationRunner`.
* Instead, the method `ChannelTaskExecutor.excuteChannelTask()` is executed
  as `@Bean.initMethod` by Spring.
* Adapted the test-cases accordingly:
** Joinig the channel-tasks is not necessary any more, because that is
   done by the imported production-config
** `KafkaConfigurationIT` has to call `executeChannelTasks()`
   explicitly
** Therefore, it has to overrule the default-config for the bean
   `dataChannelTaskExecutor` in order to drop the configuration of the
   `initMethod`.
** Otherwise, the test would (might) not restore the data from the topic,
   because the messages, that are send into the test-cluster, might arrive
   only after the initial loading of the data is done.

19 months agorefactor: Removed config-dependencies from `ChannelTaskExecutor`
Kai Moritz [Wed, 6 Mar 2024 09:23:53 +0000 (10:23 +0100)]
refactor: Removed config-dependencies from `ChannelTaskExecutor`

19 months agorefactor: Simplified shutdown - channel-tasks were joined multiple times
Kai Moritz [Wed, 6 Mar 2024 09:07:53 +0000 (10:07 +0100)]
refactor: Simplified shutdown - channel-tasks were joined multiple times

* `KafkaServicesApplicationRunner` does not have to join the channel-tasks.
* The channel-tasks are already joined by `ChannelTaskExecutor.join()`
  automatically, because the method is annotated with `@PreDestroy`.
* Simplified the test-configuration accordingly.

19 months agofix: The shutdown of the application was blocked
Kai Moritz [Wed, 6 Mar 2024 07:26:03 +0000 (08:26 +0100)]
fix: The shutdown of the application was blocked

* The auto-configured bean `applicationTaskExecutor` must not block, while
  it is shutting down, because otherwise, it infinitly waits for the
  completion, of the channel-tasks, which are stopped in a _later_ phase
  of the "smart" lifecycle.
* The bean is destroyed first, becaus it is is associated with the lowest
  lifecyle-phase (``Integer.MAX_VALUE``), which apparently cannot be
  overruled by `@DependsOn` (although suggested by the spring-
  documentation)
* Joining the channel-tasks was blocking infinitly, because the tasks were
  waiting for the kafka-consumers to be closed, what only happens _after_
  the joining completes.

19 months agofix: Detection of the `READY`-state for `InfoChannel` was flawed
Kai Moritz [Tue, 5 Mar 2024 16:50:47 +0000 (17:50 +0100)]
fix: Detection of the `READY`-state for `InfoChannel` was flawed

19 months agofeat: Implemented and configured health-indicator for the ``Channel``s
Kai Moritz [Tue, 5 Mar 2024 08:46:55 +0000 (09:46 +0100)]
feat: Implemented and configured health-indicator for the ``Channel``s

19 months agorefactor: Refined channel-states, introduced `ChannelState` -- ALIGN
Kai Moritz [Mon, 4 Mar 2024 13:34:34 +0000 (14:34 +0100)]
refactor: Refined channel-states, introduced `ChannelState` -- ALIGN

* Renamed attributes and method-names according to the class-renames.
* Introduced interface `Channel` and `enum ChannelState`.
* `Data` - and `InfoChannel` maintain a `ChannelState`, instead just a
  plain boolean, that only reflects the loading-state.
* The `ChannelTaskRunner` waits, until both channels entered the State
  `ChannelState.SHUTTING_DOWN`.

19 months agorefactor: Refined channel-states, introduced `ChannelState` -- MOVE
Kai Moritz [Mon, 4 Mar 2024 13:32:14 +0000 (14:32 +0100)]
refactor: Refined channel-states, introduced `ChannelState` -- MOVE

* Renamed and moved `LoadInProgressException`
** Moved exception into implementation-specific package
** Renamed exception to `ChannelNotReadyException`
* Renamed `ConsumerTaskExecutor` into `ChannelTaskExecutor`
* Renamed `ConsumerTaskRunner` into `ChannelTaskRunner`

19 months agotest: HandoverIT-POC - Added assertions for the sent/received messages
Kai Moritz [Mon, 4 Mar 2024 08:29:19 +0000 (09:29 +0100)]
test: HandoverIT-POC - Added assertions for the sent/received messages

19 months agotest: HandoverIT-POC - Working fix: using `delayElements()`
Kai Moritz [Sun, 3 Mar 2024 09:08:36 +0000 (10:08 +0100)]
test: HandoverIT-POC - Working fix: using `delayElements()`

* Switched from `Flux.flatMap(Mono.delay()..)` to
  `Flux.from(..).delayElements()`FIX:delay_vs_delayElements.
* This delays eache element of the `Flux` by the same amount.
* The requests are made, when the according element of the flux is
  executed - not when the `Flux` is created, as before.

19 months agotest: HandoverIT-POC - Not working fix: using `delay()`
Kai Moritz [Sat, 2 Mar 2024 17:21:44 +0000 (18:21 +0100)]
test: HandoverIT-POC - Not working fix: using `delay()`

* Switched from `Mono.from(..).delayElement()` to `Mono.delay().then()`.
* This does _not_ solve the problem, that all delays are calculated and
  scheduled, when the `Flux` is created.

19 months agoWIP:test: HandoverIT-POC - Excuting the Flu...
Kai Moritz [Fri, 22 Mar 2024 16:35:13 +0000 (17:35 +0100)]
WIP:test: HandoverIT-POC - Excuting the Flu...

19 months agoWIP:test: HandoverIT-POC - Excuting Flux...
Kai Moritz [Sun, 3 Mar 2024 09:20:11 +0000 (10:20 +0100)]
WIP:test: HandoverIT-POC - Excuting Flux...

* Droped the waiting for `TestListener` alltogehter.
* The waiting can be droped, because waiting for the `TestWriter`-instances
  ensures, that all messages are send (and therefore very likely received)

19 months agotest: HandoverIT-POC - Executing the Flux/Mono asynchrounusly
Kai Moritz [Fri, 22 Mar 2024 15:10:20 +0000 (16:10 +0100)]
test: HandoverIT-POC - Executing the Flux/Mono asynchrounusly

19 months agotest: HandoverIT-POC - Listener/Writer remember received/sent messages
Kai Moritz [Fri, 1 Mar 2024 19:18:00 +0000 (20:18 +0100)]
test: HandoverIT-POC - Listener/Writer remember received/sent messages

19 months agotest: HandoverIT-POC - Refactored listening into class `TestListener`
Kai Moritz [Fri, 1 Mar 2024 14:08:06 +0000 (15:08 +0100)]
test: HandoverIT-POC - Refactored listening into class `TestListener`

19 months agotest: HandoverIT-POC - Refactored `TestWriter` to use a `Flux`
Kai Moritz [Fri, 1 Mar 2024 13:53:43 +0000 (14:53 +0100)]
test: HandoverIT-POC - Refactored `TestWriter` to use a `Flux`

19 months agotest: HandoverIT-POC - Each `TestWriter` writes only to one chat-room
Kai Moritz [Fri, 1 Mar 2024 13:05:11 +0000 (14:05 +0100)]
test: HandoverIT-POC - Each `TestWriter` writes only to one chat-room

19 months agotest: HandoverIT-POC - Refactored / Cleaned up
Kai Moritz [Fri, 1 Mar 2024 13:02:01 +0000 (14:02 +0100)]
test: HandoverIT-POC - Refactored / Cleaned up

19 months agotest: HandoverIT-POC - Renamed `TestClient` to `TestWriter` -- ALIGN
Kai Moritz [Fri, 1 Mar 2024 12:48:57 +0000 (13:48 +0100)]
test: HandoverIT-POC - Renamed `TestClient` to `TestWriter` -- ALIGN

19 months agotest: HandoverIT-POC - Renamed `TestClient` to `TestWriter` -- MOVE
Kai Moritz [Fri, 1 Mar 2024 12:46:54 +0000 (13:46 +0100)]
test: HandoverIT-POC - Renamed `TestClient` to `TestWriter` -- MOVE

19 months agoWIP:test: HandoverIT-POC - Clients are stopped after some time
Kai Moritz [Fri, 22 Mar 2024 10:37:59 +0000 (11:37 +0100)]
WIP:test: HandoverIT-POC - Clients are stopped after some time

19 months agotest: HandoverIT-POC - Fixed illegal client-naming (one character only)
Kai Moritz [Wed, 28 Feb 2024 21:43:28 +0000 (22:43 +0100)]
test: HandoverIT-POC - Fixed illegal client-naming (one character only)

19 months agotest: HandoverIT-POC - Fixed logging of failed client-requests
Kai Moritz [Wed, 28 Feb 2024 21:39:59 +0000 (22:39 +0100)]
test: HandoverIT-POC - Fixed logging of failed client-requests

19 months agofix: Fixed `ConcurrentModificationException` when accessing a chat-room
Kai Moritz [Wed, 28 Feb 2024 10:50:11 +0000 (11:50 +0100)]
fix: Fixed `ConcurrentModificationException` when accessing a chat-room

* If a new chat-room was created, `InfoChannel` only reacted with the
  creation of the according `ChatRoomInfo`-instance.
* The creation of the accompanying `ChatRoomData`-instance through
  `DataChannel` was posponed until the new chat-room was accessed the
  first time.
* That way, `InfoChannel` did not need to know `DataChannel`, so that a
  cyclic dependency could be avoided.
* As a downside, this approach was open to a race-condition: if several
  accesses to the newly created chat-room happend in parallel, a
  `ConcurrentModificationException` was thrown, since the instance of
  `ChatRoomData` was created multiple times in parallel.
* To circumvent the locking, that would be necesarry to evade this race
  condition, the approach was refactored, so that `InfoChannel` now
  explicitly triggers the creation of the `ChatRoomData`-instance.
* To do so without introducing a cyclic dependency, the class
  `ChannelMediator` was introduced, so that `InfoChannel` and `DataChannel`
  need not to know each other.

19 months agorefactor: Introduced `ChannelMediator`
Kai Moritz [Wed, 28 Feb 2024 10:14:32 +0000 (11:14 +0100)]
refactor: Introduced `ChannelMediator`

* `InfoChannel` and `DataChannel` must not know each other directly.
* This is necessary, to prevent a cyclic dependency, that would otherwise
  be introduced, if `InfoChannel` also has to communicate with
  `DataChannel`.

19 months agotest: HandoverIT-POC - Clients are stopped after some time
Kai Moritz [Wed, 28 Feb 2024 09:09:56 +0000 (10:09 +0100)]
test: HandoverIT-POC - Clients are stopped after some time

19 months agotest: HandoverIT-POC - Running multiple clients in parallel
Kai Moritz [Wed, 28 Feb 2024 08:59:20 +0000 (09:59 +0100)]
test: HandoverIT-POC - Running multiple clients in parallel

19 months agotest: HandoverIT-POC - Added a delay to the sending-loop
Kai Moritz [Tue, 27 Feb 2024 22:53:08 +0000 (23:53 +0100)]
test: HandoverIT-POC - Added a delay to the sending-loop

19 months agotest: HandoverIT-POC - Remodeled sending into a for-loop
Kai Moritz [Tue, 27 Feb 2024 22:42:27 +0000 (23:42 +0100)]
test: HandoverIT-POC - Remodeled sending into a for-loop

19 months agotest: HandoverIT-POC - Messages are written to 23 chat-rooms instead of 1
Kai Moritz [Tue, 27 Feb 2024 20:56:45 +0000 (21:56 +0100)]
test: HandoverIT-POC - Messages are written to 23 chat-rooms instead of 1

19 months agotest: HandoverIT-POC - Splitted up code into smaller classes -- ALIGN
Kai Moritz [Wed, 20 Mar 2024 17:29:45 +0000 (18:29 +0100)]
test: HandoverIT-POC - Splitted up code into smaller classes -- ALIGN

19 months agotest: HandoverIT-POC - Splitted up code into smaller classes -- MOVE
Kai Moritz [Tue, 27 Feb 2024 08:31:51 +0000 (09:31 +0100)]
test: HandoverIT-POC - Splitted up code into smaller classes -- MOVE

19 months agotest: HandoverIT-POC - Moved general container-defs into base-class
Kai Moritz [Tue, 27 Feb 2024 08:24:41 +0000 (09:24 +0100)]
test: HandoverIT-POC - Moved general container-defs into base-class

19 months agotest: HandoverIT-POC - Setup without static containers
Kai Moritz [Tue, 27 Feb 2024 04:14:09 +0000 (05:14 +0100)]
test: HandoverIT-POC - Setup without static containers

19 months agotest: HandoverIT-POC - First working setup for the planned test
Kai Moritz [Sat, 3 Feb 2024 07:29:06 +0000 (08:29 +0100)]
test: HandoverIT-POC - First working setup for the planned test

* First working POC of the setup for the planned test.
* This version blocks endlessly, because the SSE-flux never completes.

19 months agochore: The GitHub-Action for the Maven-Build is triggerd for all branches
Kai Moritz [Fri, 15 Mar 2024 21:28:53 +0000 (22:28 +0100)]
chore: The GitHub-Action for the Maven-Build is triggerd for all branches

19 months agochore: Renamed action to "Maven-Build"
Kai Moritz [Wed, 20 Mar 2024 16:10:19 +0000 (17:10 +0100)]
chore: Renamed action to "Maven-Build"