[
https://issues.apache.org/jira/browse/ARTEMIS-2682?focusedWorklogId=418706&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-418706
]
ASF GitHub Bot logged work on ARTEMIS-2682:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 08/Apr/20 16:46
Start Date: 08/Apr/20 16:46
Worklog Time Spent: 10m
Work Description: fvaleri commented on issue #3043: ARTEMIS-2682:
OpenWireMessageConverter refactoring
URL: https://github.com/apache/activemq-artemis/pull/3043#issuecomment-611066861
Hi the build failure seems to be related to a Travis environment issue. I
can successfully run the same build command without issues.
```log
No output has been received in the last 10m0s, this potentially indicates a
stalled build or something wrong with the build itself.
```
@clebertsuconic this is what I've done:
- removed `OpenwireMessage` bean because it was just an empty implementation
and no other class was using it
- given that the inbound and outbound conversion logic was already distinct
inside the `OpenWireMessageConverter` class, I made it as Singleton that is
now calling `OpenWireMessageConverter.createInboundMessage` and
`CoreOpenWireConverter.createMessageDispatch`
- the conversion logic inside previous methods is exactly the same as it
was, I just removed some minor code duplication (*)
- created `OpenWireMessageSupport` class to host some simple utility methods
and to group all property constants that are in common between
`OpenWireMessageConverter` and `CoreOpenWireConverter`. This class also useful
in unit tests.
(*) you can easily see my changes by comparing the following:
- `OpenWireMessageConverter.inbound` (master) -->
`OpenWireCoreConverter.createInboundMessage` (branch)
- `OpenWireMessageConverter.createMessageDispatch` (master) -->
`CoreOpenWireConverter.createMessageDispatch` (branch)
I know it's just a starter, but I'm really looking forward to your comments.
I think the converter is much more manageable than before and, along with unit
tests, it should allow us to be more confident in case of future changes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 418706)
Time Spent: 2.5h (was: 2h 20m)
> OpenWireMessageConverter refactoring
> ------------------------------------
>
> Key: ARTEMIS-2682
> URL: https://issues.apache.org/jira/browse/ARTEMIS-2682
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Components: OpenWire
> Affects Versions: 2.12.0
> Reporter: Federico Valeri
> Priority: Minor
> Labels: openwire, refactoring
> Time Spent: 2.5h
> Remaining Estimate: 0h
>
> I'm proposing theĀ {{OpenWireMessageConverter}} refactoring to have a similar
> layout as the {{AMQPConverter}}. The latter has two dedicated classes for
> inbound and outbound messages with a singleton entry point for the converter.
> This change is basically doing the same without semantics change and also
> adding a unit test for the converter. I'm also eliminating some duplicated
> code, but the bulk of the code remains untouched.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)