Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create rule "Local message queue or message hub" #4

Closed
2 of 3 tasks
agoncal opened this issue May 19, 2023 · 4 comments · Fixed by #53
Closed
2 of 3 tasks

Create rule "Local message queue or message hub" #4

agoncal opened this issue May 19, 2023 · 4 comments · Fixed by #53
Assignees
Labels
Milestone

Comments

@agoncal
Copy link
Member

agoncal commented May 19, 2023

This rule highlights use of on-premises message queues which will need replaced with Azure alternatives such as Azure Service Bus or Azure Storage Queues. Specific patterns for identifying these vary based on the specific dependencies, but the most common are:

  • Use of the RabbitMQ.Client namespace which would indicate use of a local RabbitMQ instance.
  • Use of the MassTransit.Bus.Factory.CreateUsingRabbitMq API which also indicates RabbitMQ use.
  • Use of Microsoft.ServiceBus.Messaging APIs with a connection string of the form sb://<host>/<namespace> (as opposed to sb://<namespace>.servicebus.windows.net). This one is a bit nuanced because Microsoft.ServiceBus.Messaging might be used to connect to either on-premises Service Bus instances or Azure-hosted ones, and only on-premises service bus usage is problematic.

These metadata are interesting to both Azure App Service and containerized targets.

Java specific things to review:

  • Usage of JMS, look for javax.jms package usage
  • Usage of Apache MQ / Rabbit MQ clients or other 3rd party clients

Existing WindUp Rules

Existing Azure Documentation

WindUp Discovered Messaging Services

The connect.windup.groovy technology rule already checks for:

  • ActiveMQ
  • RabbitMQ
  • Spring Messaging Client
  • Amazon SQS Client
  • HornetQ Client
  • AMQP Client
  • RocketMQ Client
  • 0MQ Client
  • JBossMQ Client
  • Kafka Client

Supported Azure Messaging Services

PRs

  1. rule
    agoncal
  2. rule
    agoncal
@agoncal agoncal added the rule label May 23, 2023
@brunoborges brunoborges added this to the MVP milestone May 23, 2023
@showpune
Copy link
Collaborator

showpune commented May 25, 2023

We need to think it from serveral layer

  1. Message server you are using ( rabbit, kalfka): jar file and configuration file
  2. message framework: jms, spring-message: jar file and configuration
    jms is server independent, but spring-message sometime is server dependent, like
  3. in server bus, the annotation ServiceBusListener
  4. in rabbitmq, the annothation RabbitListener

@agoncal
Copy link
Member Author

agoncal commented Jun 30, 2023

We already have a SpringBoot rule on MQ: https://github.com/Azure/windup-rulesets/blob/main/rules/rules-reviewed/azure/springboot/spring-boot-to-azure-mq-config.windup.xml

@brunoborges @showpune as we only have an Active MQ rule for now, shall we create/override rules on:

  • Rabbit MQ
  • Kalfka

@brunoborges
Copy link
Member

I think Kafka is a must for the MVP.

@agoncal
Copy link
Member Author

agoncal commented Jul 12, 2023

PR on its way: #114

@agoncal agoncal closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

3 participants