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