Kai Moritz [Sat, 22 Jun 2024 12:22:35 +0000 (14:22 +0200)]
counter: 1.4.0 - Refined output JSON to match the new general stats-format
* Changed the type-mapping for `Word` from `word` to `key`.
* Refined the class `Word`, that defines the JSON for the output key.
** Added attribute `type` with fixed value `POPULAR`.
** Renamed attribute `user` to `channel`.
** Renamed attribute `word` to `key`.
* Refined the class `WordCounter`, that defines the JSON for the output
value.
** Renamed attribute `word` to `key`.
* Adapted test-classes and -cases accordingly.
* Refactored the creation of the ``JsonSerde``s, that are used to consume
the incomming messages.
* All special ``Serdes``, that are used for incomming and outgoing messages,
are created in separted methods now.
* Removed unnecessary operatorx in the ``Materialized``-configuration for
the state store (the operator is not necessary, because no headers are
present, when deserializing from a store).
Kai Moritz [Sun, 16 Jun 2024 17:57:23 +0000 (19:57 +0200)]
counter: 1.3.1 - Refined/Simplified the type-mapping
* Removed all explicit type-mappings for the internally used types.
* This greatly simplifies the configuration, because it is sufficient to
configure the trusted package to serialize/deserialize all internally
used types.
* To make this possible, the type-mappings for the outgoing messages are
specified with `Produced.with()` in the ``to()``-operation.
* `CounterStreamProcessorTopologyTest` uses the type-headers to determine
the correct type for the deserialization of the output-data.
* Beforehand, the used types were hard-coded in the test.
Kai Moritz [Wed, 5 Jun 2024 19:44:26 +0000 (21:44 +0200)]
counter: 1.3.0 - (RED) Made `CounterApplicationIT` fail too
* Validate with: `mvn test -Dtest=CounterApplicationI`
* Turning on the caching forces the application, to serialize and
deserialize _every_ message, hence, revealing the bug, that was only
detected by the `CounterStreamProcessorToplogyTest` before, that always
behaves like this.
Kai Moritz [Wed, 5 Jun 2024 19:30:17 +0000 (21:30 +0200)]
counter: 1.3.0 - (RED) Introduced domain-class `User` as key
* _GREEN:_ The `CounterApplicationIT` does _not_ reveal the bug!
* _RED:_ The `CounterStreamProcessorToplogyTest` fails with an exception,
that gives a hint for the cause of the bug.
* The bug is caused by missing type-specifications for the operation
``cout()``.
* Before the introduction of the domain-class `User` everything worked as
expected, because the class `Word` could be specified as default for
the deserialization of the key.
** With the introduction of the domain-class `User` as key of the incoming
messages, the default for the key has to switched to this class, to
enable the application to deserialize incomming keys despite the missing
type mapping.
** Beforehand, the default `Word` covered the missing type information
for the ``count()``-operator.
Kai Moritz [Fri, 17 Feb 2023 13:48:23 +0000 (14:48 +0100)]
coutner: 1.2.3 - Simplified topology, using default-serdes for all steps
- Defined `JsonSerde` as default for keys and values.
- Configured the `JsonDeserializer` for header-based typing.
- Removed the configuration of specific serdes from all steps of the
processor-topology, expect the initial step, that needs a `StringSerde`
for the key.
Kai Moritz [Wed, 15 Feb 2023 07:19:09 +0000 (08:19 +0100)]
counter: 1.2.0 - Service reads/writes using `JsonSerde`
- First working version of a refined topology, that reads and writes
key and value with the `JsonSerde`.
- This topology expects and writes all data as JSON, except the key
of the incomming messages.
- All used Serdes are directly configured in the topology.
Kai Moritz [Sat, 11 Feb 2023 12:02:44 +0000 (13:02 +0100)]
counter: 1.1.11 - Added a test, that is based on `TopologyTestDriver`
- The test reuses `TestData` to asserts the exact same assumptions, as
`CounterApplicationIT`.
- The only difference is, that the message processing is carried out by
the `ToplogyTestDriver` instead of a real Kafka cluster, that is started
along the test-code in the same JVM, as in `CounterApplicationIT`.
Kai Moritz [Tue, 14 Feb 2023 19:03:08 +0000 (20:03 +0100)]
counter: 1.1.7 - Fixed a bug in the assertion-logic for the expected state
- Each combination of a user and a word is a uniq key.
- Since the ordering is only guaranteed for messages, with the same key,
no expectations can be made according the ordering of messages with
different keys!
- This also simplifies the test-logic, because no deserialization is needed
any more to pick the username out of the JSON-data.
Kai Moritz [Sat, 11 Feb 2023 14:26:42 +0000 (15:26 +0100)]
counter: 1.1.5 - Fixed a bug in the integration-test `CounterApplicationIT`
- The default store-type creates state, that is stored on disk.
- Hence, only the first run of the test succseeded.
- The bug was fixed by providing an in-memory store-type.