Skip to content

Conversation

@onobc
Copy link
Collaborator

@onobc onobc commented Jul 24, 2021

This code proposal breaks the dependence on RabbitAutoConfiguration for the rabbit-consumer and rabbit-supplier functions.

⚠️ The changes that make this possible are in 2.6 branch of Spring Boot. I am sure that the team would prefer to have a separate pull request for upgrading to 2.6 rather than piggyback it in w/ this change. Please advise and I will pivot as requested.

@sabbyanandan @garyrussell this is the streams-application counterpart to the spring-cloud-stream-rabbit-binder one.

$$data-username$$:: $$Username of the database to execute DML scripts (if different).$$ *($$String$$, default: `$$<none>$$`)*
$$driver-class-name$$:: $$Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.$$ *($$String$$, default: `$$<none>$$`)*
$$embedded-database-connection$$:: $$Connection details for an embedded database. Defaults to the most suitable embedded database that is available on the classpath.$$ *($$EmbeddedDatabaseConnection$$, default: `$$<none>$$`, possible values: `NONE`,`H2`,`DERBY`,`HSQL`,`HSQLDB`)*
$$embedded-database-connection$$:: $$Connection details for an embedded database. Defaults to the most suitable embedded database that is available on the classpath.$$ *($$EmbeddedDatabaseConnection$$, default: `$$<none>$$`, possible values: `NONE`,`H2`,`DERBY`,`HSQLDB`)*
Copy link
Collaborator Author

@onobc onobc Jul 24, 2021

Choose a reason for hiding this comment

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

[UNRELATED+BOOT26] this same comment applies to all changes in any README files.

.getCompleteConfiguration(RedisSinkTestApplication.class))
.web(WebApplicationType.NONE)
.run("--spring.cloud.function.definition=redisConsumer",
"--spring.cloud.compatibility-verifier.enabled=false",
Copy link
Collaborator Author

@onobc onobc Jul 24, 2021

Choose a reason for hiding this comment

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

[UNRELATED+BOOT26+TEMPORARY] Spring Boot 2.6. Spring Cloud balks at any attempt to use > 2.5

*/
@SpringBootTest(properties = {
"spring.data.mongodb.port=0",
"spring.mongodb.embedded.version=4.0.12",
Copy link
Collaborator Author

@onobc onobc Jul 24, 2021

Choose a reason for hiding this comment

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

[UNRELATED+BOOT26]
The default embedded MongoDB version has been removed in 2.6.

  • This comment applies to all instances of this being set in tests
  • There is probably a more general place to set this than here and in each test.

import org.springframework.messaging.MessageHandler;

/**
* A configuration for RabbitMQ Consumer function. Uses a
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

[NOTE] I reverse-engineered this comment from git history.

private RabbitProperties rabbitProperties;

@Autowired
private ObjectProvider<ConnectionNameStrategy> connectionNameStrategy;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was only in here to appease the signature of the connection factory creator. The code immediately turned arounds and overrides the naming strategy so I removed this.

private RabbitProperties bootProperties;

@Autowired
private ObjectProvider<ConnectionNameStrategy> connectionNameStrategy;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was only in here to appease the signature of the connection factory creator. The code immediately turned arounds and overrides the naming strategy so I removed this.

@onobc onobc self-assigned this Jan 19, 2022
@onobc onobc closed this Jan 27, 2022
@onobc
Copy link
Collaborator Author

onobc commented Jan 27, 2022

Original forked branch was deleted - reworked in new fork - excluding all boot 26 and doc commits that were in this PR.

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.

1 participant