32.3.3. 高度な AmazonSNS 設定
AmazonSNS インスタンス設定をより制御する必要がある場合は、独自のインスタンスを作成して URI から参照することができます。
from("direct:start")
.to("aws-sns://MyTopic?amazonSNSClient=#client");
#client はレジストリーの AmazonSNS を参照します。
たとえば、Camel アプリケーションがファイアウォールの内側で実行されている場合は、以下のようになります。
AWSCredentials awsCredentials = new BasicAWSCredentials("myAccessKey", "mySecretKey");
ClientConfiguration clientConfiguration = new ClientConfiguration();
clientConfiguration.setProxyHost("http://myProxyHost");
clientConfiguration.setProxyPort(8080);
AmazonSNS client = new AmazonSNSClient(awsCredentials, clientConfiguration);
registry.bind("client", client);