Skip to content
Snippets Groups Projects
Verified Commit 140ee84f authored by Michaël El Kharroubi's avatar Michaël El Kharroubi :satellite:
Browse files

Structure de fichiers

parent bbc8121d
No related branches found
No related tags found
1 merge request!21*poof* final version
package ch.hepia.mq;
public class MessageQueue{
//public MessageQueue()
}
\ No newline at end of file
......@@ -5,8 +5,6 @@ import com.rabbitmq.client.Connection;
import com.rabbitmq.client.ConnectionFactory;
public class ProviderExch {
private final static String QUEUE_NAME = "Pouet";
private final static String EXCH_NAME = "broadcaster";
public static void main(String[] argv) throws Exception {
......@@ -15,8 +13,6 @@ public class ProviderExch {
factory.setUsername("frog");
factory.setPassword("poney1234");
try (Connection connection = factory.newConnection(); Channel channel = connection.createChannel()) {
channel.exchangeDeclare("bcast", "fanout");
//channel.queueDeclare(QUEUE_NAME, false, false, false, null);
String message = "Bonjour, queue !";
channel.basicPublish(EXCH_NAME, "", null, message.getBytes("UTF-8"));
System.out.println(" [x] Sent '" + message + "'");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment