I have a couple of microservices developed using spring boot and each has its own Postgres database. These microservices exchange data with a CDC mechanism provided by debezium
this is solution for Java - https://debezium.io/docs/faq/#how_to_retrieve_decimal_field_from_binary_representation
Also please check decimal.handling.mode option for other ways how BigDecimal can be encoded into the message.
decimal.handling.mode
BigDecimal