feat: add web demo for producer/consumer testing with JDK queue#3
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
feat: add web demo for producer/consumer testing with JDK queue#3devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: kenlin <kenlin8827@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a browser-based demo application (test scope) for interactively testing the itqueue producer/consumer flow using the JDK in-memory queue backend (no Redis required).
New test files:
DemoApplication.java— Spring Boot entry point excluding Redis andItQueueAutoConfigQueueController.java— REST controller exposing/api/send,/api/send-batch,/api/consumed,/api/produced,/api/errors,/api/clearindex.html— Single-page UI with producer form, consumer view, live stats, and activity logpom.xml changes:
spring-boot-starter-web(test scope) for the embedded Tomcat servermaven-compiler-pluginfrom unversioned (3.1) to 3.11.0 and added LombokannotationProcessorPathsto fix Lombok setter generation during compilationHow to run:
mvn test-compile && java -cp "target/classes:target/test-classes:$(mvn dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=/dev/stdout -q)" io.github.ithamal.queue.demo.DemoApplication, then openhttp://localhost:8080.Review & Testing Checklist for Human
maven-compiler-pluginchanges affect production build — The version bump to 3.11.0 and the addedannotationProcessorPathsare NOT test-scoped; they change how the main artifact is compiled. Verify this doesn't alter the published JAR behavior or break existing CI.sendBatch—(Integer) body.getOrDefault("count", 5)may throwClassCastExceptionif Jackson deserializes the JSON number as a different type (e.g.,Long). Test with various count values.index.html—${m.payload}is injected directly intoinnerHTMLwithout escaping. Low risk since this is test-only, but worth noting if the demo is shared.Notes
nullbecause the JDK queue backend does not assign IDs (only Redis backends do). Theconsumer.ack(null)call is effectively a no-op in the JDK implementation.ConcurrentLinkedQueue) grow unbounded — acceptable for a demo but not production use.Link to Devin session: https://app.devin.ai/sessions/32eb0f67b07f482ab5e68b341d831103
Requested by: @kenlin8827