fcrepo-exts / fcrepo-camel-toolbox

A collection of ready-to-use messaging applications with fcrepo-camel
Apache License 2.0
13 stars 26 forks source link

Align fcrepo-camel-toolbox with fcrepo-camel/4.5.0-SNAPSHOT #115

Closed acoburn closed 7 years ago

acoburn commented 7 years ago

Resolves: https://jira.duraspace.org/browse/FCREPO-2319

This is spread across many commits, each one corresponding to a different module (the idea was to make this easier to review)

birkland commented 7 years ago

@acoburn I have a build failure on Windows. Am going to head off into the woods for a few days, but can see if anything is obvious next week

java.lang.AssertionError: null
        at org.junit.Assert.fail(Assert.java:86)
        at org.junit.Assert.assertTrue(Assert.java:41)
        at org.junit.Assert.assertTrue(Assert.java:52)
        at org.fcrepo.camel.fixity.integration.RouteIT.testFixityOnBinary(RouteIT.java:144)

Also, I noticed that the camel version is 2.18. I'm curious to see what was done in order to get ActiveMQ working with it. I tried simply bumping to 2.18 on API-X a few weeks ago, but bumped into CAMEL-10405 (also mentioned in this thread)

acoburn commented 7 years ago

@birkland it took some effort to get ActiveMQ to work with Camel 2.18.0 and Karaf. Here are the relevant lines: https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/blob/517acca8019e5c5d1e63eeb84f85e372ff7fe6b1/fcrepo-service-activemq/src/main/resources/OSGI-INF/blueprint/blueprint.xml#L20-L40

Setting userName and password directly on the ActiveMQComponent didn't work for me (and we absolutely need that at Amherst), but by using an ActiveMQConnectionFactory and setting the configuration on that, I was able to get this to work. You'll see that I also added a pooled connection handler, which will make transport faster.

Enjoy your time outdoors!

acoburn commented 7 years ago

One note on this PR -- with this change, the camel-toolbox is no longer tied to a particular version of camel (provided that the version is at least 2.18.0) and a particular version of ActiveMQ (provided that the version is at least 5.14.0). At present, that means using the latest version of those, but as camel and AMQ make subsequent releases, users of the camel toolbox can decide whether to upgrade or not. It also means that using other toolkits (e.g. API-X) that may require particular versions of camel, etc can more happily co-exist. It also means that, as features become available in camel, users of the camel-toolbox do not need to wait until the camel-toolbox cuts a new release before updating camel. This means that there will be an extra step in the installation process, but much of the advice currently in the README should be clarified/revised anyway.

awoods commented 7 years ago

This is spread across many commits, each one corresponding to a different module (the idea was to make this easier to review)

It does make it easier to review... thanks.

awoods commented 7 years ago

@acoburn , are you waiting on any other reviewers? If not, I am happy to move this PR forward.

acoburn commented 7 years ago

@awoods feel free to proceed. Thanks!