Giter VIP home page Giter VIP logo

gs-messaging-rabbitmq's Issues

Not able to run the Complete part

Here is my errors

Exception in thread "main" java.lang.IllegalArgumentException: Attribute 'exclude' is of type [Class[]], but [String[]] was expected. Cause: 
    at org.springframework.core.annotation.AnnotationAttributes.doGet(AnnotationAttributes.java:117)
    at org.springframework.core.annotation.AnnotationAttributes.getStringArray(AnnotationAttributes.java:70)
    at org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.selectImports(EnableAutoConfigurationImportSelector.java:63)
    at org.springframework.context.annotation.ConfigurationClassParser.processImport(ConfigurationClassParser.java:386)
    at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:204)
    at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:163)
    at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:138)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:284)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:225)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:630)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:461)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:683)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:944)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:933)
    at Application.main(Application.java:71)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

Here is the link on the stackoverflow

http://stackoverflow.com/questions/29892408/whats-wrong-with-rabbitmq-in-spring-boot

cannot access hello - zip END header not found

With starter 2.1.4.RELEASE I get the following error with mvn compile.

[ERROR] /tmp/rabbit/gs-messaging-rabbitmq/complete/src/main/java/hello/Runner.java:[1,1] cannot access hello
[ERROR] zip END header not found

And a lot more ERRORs like this.

Wrong class link in the guide

This guide has link to:

:complete/src/main/java/com/example/messagingrabbitmq/MessagingRabbitApplication.java[]

Which is invalid and should be changed (I guess) to:

complete/src/main/java/com/example/messagingrabbitmq/MessagingRabbitmqApplication.java

Guide doesn't use the configured exchange/routing key

https://stackoverflow.com/questions/49304107/how-to-identify-the-exchange-to-which-the-message-is-routed-to-in-spring-boot-ra/49304417#comment85708903_49304417

The Runner sends the message to the default exchange ("") with the queue name as the routing key

rabbitTemplate.convertAndSend(Application.queueName, "Hello from RabbitMQ!");

It would be better to send to the explicit exchange and use some other routing key to bind the queue.

rabbitTemplate.convertAndSend("spring-boot-exchange", "some.routing.key", "Hello from RabbitMQ!");

Since the exchange is a topic exchange, it can use a binding like some.routing.#.

Or, drop the exchange/binding from the config if we want the "simplest" GSG.

Remove unused CI files

The file test/run.sh is no longer required. This file and the test directory can be deleted.

The file was originally used for Jenkins CI. Now that this project has been converted to GitHub Actions, this file can be removed.

Introduce Spring Native Support

Opening this issue to continue the conversation found in this PR.

In order to build this guide as is with native compilation a custom hint needs to be provided. Specific details on the hint required can be found in this commit. The parts about native compilation were reverted prior to merging.

Consider adding native support compilation to this guide.

Docker compose file for RabbitMQ throws an error

Based on the instructions here - https://github.com/spring-guides/gs-messaging-rabbitmq?tab=readme-ov-file#what-you-need

The docker compose file for installing rabbitmq looks like this

rabbitmq:
  image: rabbitmq:management
  ports:
    - "5672:5672"
    - "15672:15672"

This is either incomplete or incorrect, because docker-compose up command fails with this file.

D:\Downloads\messaging-rabbitmq
docker-compose up
validating D:\Downloads\messaging-rabbitmq\docker-compose.yml: (root) Additional property rabbitmq is not allowed

Version information

D:\Downloads\messaging-rabbitmq
docker compose version
Docker Compose version v2.24.3-desktop.1


D:\Downloads\messaging-rabbitmq
docker version
Client:
 Cloud integration: v1.0.35+desktop.10
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:24:09 2024
 OS/Arch:           windows/amd64
 Context:           default

Server: Docker Desktop 4.27.1 (136059)
 Engine:
  Version:          25.0.2
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       fce6e0c
  Built:            Thu Feb  1 00:23:17 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0

NoSuchBeanDefinitionException for AnnotationConfigApplicationContext

I was wondering if you could please help me, I took the exact code from the complete folder and when I try and run it I get the following error:

Caused by:

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.springframework.context.annotation.AnnotationConfigApplicationContext] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

It seems to be swearing about

    @Autowired
    AnnotationConfigApplicationContext context;

I know my rabbit server is running as i have checked with rabbitmqctl status and its all ok. And then I found the RabbitAutoConfigurationTests which all run and pass.

Any idea what I could be doing wrong?

Upgrade Spring Boot to the latest version

Update the guide to use the most recent Spring Boot version.

Files that require changes are:

initial/build.gradle
initial/pom.xml
complete/build.gradle
complete/pom.xml

Documentation should reference more recent Docker Compose command

The current documentation states references docker-compose up when it should use docker compose up instead. More details here.

The text to be changed is in the Preparing to Build the Application section of the README.adoc:

You can now run docker-compose up to start the RabbitMQ service. Now you should have an external RabbitMQ server that is ready to accept requests.

Should instead be:

You can now run docker compose up to start the RabbitMQ service. Now you should have an external RabbitMQ server that is ready to accept requests.

Not acknowledging receive

When running the sample app on the second time, it seems to be receiving the message from the previous run, I guess its not acknowledging the message from RabbitMQ?
p.s I'm very new to RabbitMQ, so I am not sure if this is working as expected.

Problem with building sample rabbitmq code in gradle

After launching rabbitmq-server and then ran the sample code in gradle, but sure why cannot build :

https://bitbucket.org/niceseb/myrabbitmq

Caused by: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
        at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:367)
        at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:31)
        at org.gradle.api.tasks.JavaExec.exec(JavaExec.java:75)
        at org.springframework.boot.gradle.run.BootRunTask.exec(BootRunTask.java:63)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
        at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
        ... 14 more


BUILD FAILED

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.