protected override void Up(RabbitMqMigrationBuilder migrationBuilder) { //setup inbound queues migrationBuilder.AddQueue(PolarisAcdrQueueIn) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeIn) .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.ACDR.EU.2") .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.ACDR.EU.2.#"); }
protected override void Up(RabbitMqMigrationBuilder migrationBuilder) { migrationBuilder.AddTopicExchange("foo") .SetDurable(true); migrationBuilder.AddQueue("bar") .SetDurable(true) .SetAutoDelete(false) .AddQueueBind("foo", "#"); }
protected override void Up(RabbitMqMigrationBuilder migrationBuilder) { migrationBuilder.AddTopicExchange("fooTopic").SetDurable(true); migrationBuilder.AddDirectExchange("fooDirect").SetDurable(true); migrationBuilder.AddFanoutExchange("fooFan").SetDurable(true); migrationBuilder.AddHeadersExchange("fooHead").SetDurable(true); migrationBuilder.AddExchange("fooDel", ExchangeType.Topic); migrationBuilder.AddQueue("bar"); migrationBuilder.AddQueue("fooQueue"); migrationBuilder.AddQueue("barDel"); migrationBuilder.BindExchange("fooTopic", "fooQueue", "#").AddArgument("foo", "bar"); migrationBuilder.BindQueue("bar", "fooFan", "#").AddArgument("foo", "bar"); migrationBuilder.MoveDataToQueue("barDel", "bar"); migrationBuilder.MoveDataToExchange("bar", "fooTopic"); migrationBuilder.DeleteQueue("barDel").SetIfEmpty(true); migrationBuilder.DeleteExchange("fooDel").SetIfUnused(true); migrationBuilder.UnbindExchange("fooTopic", "fooQueue", "#").AddArgument("foo", "bar"); migrationBuilder.UnbindQueue("bar", "fooFan", "#").AddArgument("foo", "bar"); }
protected override void Up(RabbitMqMigrationBuilder migrationBuilder) { //setup dead letter exchanges migrationBuilder.AddTopicExchange(PolarisDeadLetterExchangeIn) .SetDurable(true); migrationBuilder.AddTopicExchange(PolarisDeadLetterExchangeOut) .SetDurable(true); //setup topic exchanges migrationBuilder.AddTopicExchange(PolarisExchangeIn) .SetDurable(true) .SetAlternativeExchange(PolarisDeadLetterExchangeIn); migrationBuilder.AddTopicExchange(PolarisExchangeOut) .SetDurable(true) .SetAlternativeExchange(PolarisDeadLetterExchangeOut); //setup inbound queues migrationBuilder.AddQueue(PolarisSalesQueueIn) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeIn) .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.SALES.EU.2") .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.SALES.EU.2.#"); migrationBuilder.AddQueue(PolarisVesselQueueIn) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeIn) .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.VESSEL.EU.2") .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.VESSEL.EU.2.#"); migrationBuilder.AddQueue(PolarisMdrQueueIn) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeIn) .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.MDM.EU.2") .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.MDM.EU.2.#"); migrationBuilder.AddQueue(PolarisFishingActivityQueueIn) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeIn) .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.FA.EU.2") .AddQueueBind(PolarisExchangeIn, "urn.un.unece.uncefact.fisheries.*.FA.EU.2.#"); migrationBuilder.AddQueue(PolarisAssignedOnQueueIn) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeIn) .AddQueueBind(PolarisExchangeIn, "FLUX.ON"); //setup outbound queues migrationBuilder.AddQueue(PolarisFluxQueueOut) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeOut) .AddQueueBind(PolarisExchangeOut, "urn.un.unece.uncefact.fisheries.FLUX.#"); migrationBuilder.AddQueue(PolarisAuctionQueueOut) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeOut) .AddQueueBind(PolarisExchangeOut, "urn.un.unece.uncefact.fisheries.AUCTION.#"); migrationBuilder.AddQueue(PolarisMCatchQueueOut) .SetDurable(true) .SetAutoDelete(false) .SetDeadLetterExchange(PolarisDeadLetterExchangeOut) .AddQueueBind(PolarisExchangeOut, "urn.un.unece.uncefact.fisheries.MCATCH.#"); //setup dead letter queues migrationBuilder.AddQueue(PolarisDeadLetterQueueIn) .SetDurable(true) .SetAutoDelete(false) .AddQueueBind(PolarisDeadLetterExchangeIn, "#"); migrationBuilder.AddQueue(PolarisDeadLetterQueueOut) .SetDurable(true) .SetAutoDelete(false) .AddQueueBind(PolarisDeadLetterExchangeOut, "#"); }