Skip to content

Comments

Add full event as base 64 encoded X-Islandora-Event header#94

Merged
aOelschlager merged 5 commits into2.xfrom
x-islandora-event-header
Dec 9, 2025
Merged

Add full event as base 64 encoded X-Islandora-Event header#94
aOelschlager merged 5 commits into2.xfrom
x-islandora-event-header

Conversation

@seth-shaw-asu
Copy link
Member

@seth-shaw-asu seth-shaw-asu commented Nov 13, 2025

GitHub Issue: Event RFD (0000)

What does this Pull Request do?

Add the complete event JSON as an X-Islandora-Event HTTP header when calling microservices

  • Serialize the full event payload to JSON
  • Base64 encode if needed to handle special characters
  • Include as additional header alongside existing parameters

How should this be tested?

🤷‍♂️ - throwing this up here for now; but I'm guessing we need to

  1. Deploy it
  2. Create a microservice that will read out the new header and dump it so we can see that it came through
  3. Add an event to the queue for the new service so Alpaca picks it up and shuttles the event along.

The resulting alpaca build is too big for GitHub to permit me to attach it here. So, to build it yourself only using docker (no Java or Gradle required): docker run --rm -v "$(pwd):/app" -w /app eclipse-temurin:11 ./gradlew --stacktrace clean build shadowJar --no-daemon.

The resulting Jar file you need will be @ islandora-alpaca-app/build/libs/islandora-alpaca-*-all.jar

Interested parties

@Islandora/committers, esp @joecorall

@joecorall
Copy link
Member

relates to Islandora-Labs/rfds#1

@whikloj
Copy link
Member

whikloj commented Nov 21, 2025

Wondering if it might be easier to add the X-Islandora-Event header in Drupal and just have Alpaca pass it along? Especially if you are planning to stop using Alpaca anyways.

@joecorall
Copy link
Member

@whikloj - do you see something wrong with the proposed changes in this PR? The change here seem small enough I think since the work is mostly done the clearest path may be to merge this PR after it's tested successfully.

@whikloj
Copy link
Member

whikloj commented Nov 25, 2025

I don't see anything wrong specifically, you might want a try {} catch in case something goes haywire to add some logging and still send the message along. I haven't tested it though. I just mentioned this as it was my understanding is this is the first step in a process of moving away from ActiveMQ and Camel to everything in Drupal. So if Alpaca is going away, and this message will be needed in future anyways, why not send it directly from Drupal.

@joecorall
Copy link
Member

So if Alpaca is going away, and this message will be needed in future anyways, why not send it directly from Drupal

It's just a bit of pragmatism. Right now changing alpaca will allow this new class of microservices that need this data to work for everyone. If we sent this new header from Drupal we'd need some other way to propogate the header to the respective microservice rather than going through the current happy path of drupal->activemq->alpaca->microservice.

joecorall added a commit to Islandora-Devops/isle-buildkit that referenced this pull request Nov 25, 2025
@joecorall joecorall force-pushed the x-islandora-event-header branch 7 times, most recently from 5f633f3 to 87bf621 Compare November 25, 2025 20:50
…ca/connector/derivative/DerivativeConnector.java
@joecorall joecorall force-pushed the x-islandora-event-header branch from 7462a9f to 7119725 Compare November 25, 2025 21:38
@joecorall
Copy link
Member

I had to make a change to this PR. One of the new class of microservices that rely on X-Islandora-Event (namely mergepdf) does not have an attachment (i.e. a source file) so those event attributes need to be optional 7119725

@joecorall joecorall marked this pull request as ready for review November 26, 2025 07:48
@whikloj
Copy link
Member

whikloj commented Nov 26, 2025

I know this isnt the right place for this but I am looking to alter our tesseract actor to build hOCR and OCR at the same time. Perhaps we need a specification for the messages we are sending, then it would be easier to ensure all clients (I.e. Alpaca, etc) can handle all cases.

Copy link
Contributor

@adam-vessey adam-vessey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of tiny coding standards things.

joecorall and others added 2 commits November 26, 2025 14:00
Co-authored-by: Adam <607975+adam-vessey@users.noreply.github.com>
…ca/connector/derivative/DerivativeConnector.java

Co-authored-by: Adam <607975+adam-vessey@users.noreply.github.com>
@joecorall
Copy link
Member

@whikloj I know this isnt the right place for this but I am looking to alter our tesseract actor to build hOCR and OCR at the same time. Perhaps we need a specification for the messages we are sending, then it would be easier to ensure all clients (I.e. Alpaca, etc) can handle all cases.

Let's have this conversation in Islandora-Labs/rfds#1

Copy link

@aOelschlager aOelschlager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this pr with Joe's buildkit pr and it works! I was able to generate derivatives including the merge pdf derivatives.

@aOelschlager aOelschlager merged commit 7806986 into 2.x Dec 9, 2025
1 check passed
@joecorall joecorall deleted the x-islandora-event-header branch December 9, 2025 18:52
aOelschlager pushed a commit to Islandora-Devops/isle-buildkit that referenced this pull request Dec 9, 2025
* Build alpaca JAR

* checkout Islandora/Alpaca#94

* fix build

* Use image with git installed

* Add merge PDF

* update README

* Update README

* term_from_term_name route is protected by auth

* Update README with jwt_auth requirement

Added requirement for jwt_auth in term_from_term_name view.

* Update push.yml

* Enable MERGEPDF in Dockerfile

* Added URL decoding for '%' characters in URLs.

* Make the drupal URI configurable

* standardize alpaca install with scyllaridae pattern

* use base to access download.sh

---------

Co-authored-by: Seth Shaw <108362375+seth-shaw-asu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants