Skip to content

Instantly share code, notes, and snippets.

@atesibrahim
Last active July 5, 2022 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atesibrahim/dea6f09bf7ef4197a7b27fc6e8031285 to your computer and use it in GitHub Desktop.
Save atesibrahim/dea6f09bf7ef4197a7b27fc6e8031285 to your computer and use it in GitHub Desktop.
import org.springframework.amqp.rabbit.core.RabbitTemplate;
public class EnqueueService {
private final RabbitTemplate rabbitTemplate;
public void enqueue(YourObject request) {
rabbitTemplate.convertAndSend(RabbitMqExchangeConfiguration.EXCHANGE, "", request);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment