---
schema_version: "1"
id: 1e3bea8fcfde6395a171e97215aca524bb3e0c07d13803f431bde98954c60ab4
title: AMQP トポグラフィの変更を回避
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/amqp-connector/1.6/amqp-topography.md
canonical_url: https://docs.mulesoft.com/jp/amqp-connector/1.6/amqp-topography
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 0b439c29f90d8dd78709d597f50451472ff81138c04e80cf69dd7462b0e62cbb
description: MuleSoft Documentation Site
release: "1.6"
latest: false
---
# AMQP トポグラフィの変更を回避

AMQP の交換とキューの宣言が無効になるように、​`createFallbackExchange`​ および ​`createFallbackQueue`​ グローバル設定プロパティを設定できます。AMQP トポグラフィの変更が試行されないことを保証する必要があるシナリオでは、これらのパラメーターが追加されています。そのような場合、以前に存在していないキューと交換の両方の宣言で ​`AMQP:CREATION_NOT_ALLOWED`​ エラーが発生します。

たとえば、次のフローがあるとします。

```xml
<amqp:config name="Amqp_Config" createFallbackExchange="false" >
	<amqp:connection host="localhost" username="guest" password="guest" />
</amqp:config>


<flow name="mule-no-create-fallback-queue">
	<http:listener
		doc:name="Listener"
		config-ref="HTTP_Listener_config"
		path="/"/>
	<amqp:publish
		doc:name="Publish"
		config-ref="Amqp_Config"
		exchangeName="newExchange">
		<amqp:fallback-exchange-definition />
	</amqp:publish>
</flow>
```

`newExchange`​ エクスチェンジが存在せず、​`createFallbackExchange`​ が ​`false`​ に設定されている場合、publish 操作の呼び出しで ​`AMQP:CREATION_NOT_ALLOWED`​ エラーが発生します。 `createFallbackExchange`​ は、操作レベルで上書きでき、値として式を取得できます。次に例を示します。

<flow name="mule-no-create-fallback-queue">
	<http:listener doc:name="Listener"config-ref="HTTP\_Listener\_config" path="/"/>
	<amqp:publish
		doc:name="Publish"
		config-ref="Amqp\_Config"
		exchangeName="newExchange"
		createFallbackExchange="false">
		<amqp:fallback-exchange-definition />
	</amqp:publish>
</flow>

consume 操作の ​`createFallbackQueue`​ パラメーターの使用方法は類似しています。

```xml
<amqp:config
	name="Amqp_Config"
	createFallbackQueue="false" >
	<amqp:connection
		host="localhost"
		username="guest"
		password="guest" />
</amqp:config>


<flow name="mule-no-create-fallback-queue">
	<http:listener
		doc:name="Listener"
		config-ref="HTTP_Listener_config"
		path="/"/>
	<amqp:consume
		config-ref="Amqp_Config"
		queueName="testQueue">
		<amqp:fallback-queue-definition
			removalStrategy="SHUTDOWN"
			exchangeToBind="exchangeToBindToQueue" />
	</amqp:consume>
</flow>
```

このパラメーターは、リスナーでも使用できます。

```xml
<amqp:config
	name="Amqp_Config"
	createFallbackQueue="false" >
	<amqp:connection
		host="localhost"
		username="guest"
		password="guest" />
</amqp:config>


<flow name="mule-no-create-fallback-queue">
	<amqp:listener
		config-ref="Amqp_Config"
		queueName="testQueue">
		<amqp:fallback-queue-definition
			removalStrategy="SHUTDOWN"
			exchangeToBind="exchangeToBindToQueue" />
	</amqp:listener>
	<amqp:consume
		config-ref="Amqp_Config"
		queueName="testQueue">
		<amqp:fallback-queue-definition
			removalStrategy="SHUTDOWN"
			exchangeToBind="exchangeToBindToQueue" />
	</amqp:consume>
</flow>
```