ページの先頭行へ戻る
Interstage Application Server V13.0.0 GlassFish 設計・構築・運用ガイド
FUJITSU Software

10.6 imqcmd

名前

imqcmd - メッセージブローカの管理


形式

(1)サブコマンドの実行
  imqcmd サブコマンド "オプション"

(2)ヘルプの表示
  imqcmd {-help|-h|-Help|-H}


機能説明

物理格納先の作成、削除などを行います。
以下のサブコマンドがあります。

サブコマンド

説明

create dst

物理格納先を作成します。

destroy cxn

コネクションを削除します。

destroy dst

物理格納先を削除します。

destroy dur

永続サブスクリプションを削除します。

list cxn

メッセージブローカが管理しているコネクションの一覧を表示します。

list dst

メッセージブローカが管理している物理格納先の一覧を表示します。

list dur

サブスクリプションの一覧を表示します。

list svc

メッセージブローカが管理しているサービスの一覧を表示します。

pause bkr

メッセージブローカのすべてのサービスを一時停止します。

pause dst

1つまたはすべての物理格納先を一時停止します。

purge dst

物理格納先を削除しないで、物理格納先のすべてのメッセージを破棄します。

purge dur

永続サブスクリプションを削除しないで、永続サブスクリプションのすべてのメッセージを破棄します。

query bkr

メッセージブローカの情報を照会して表示します。

query cxn

コネクション情報を照会して表示します。

query dst

物理格納先の情報を照会して表示します。

query svc

サービスの情報を照会して表示します。

restart bkr

メッセージブローカを再起動します。

resume bkr

メッセージブローカのサービスを再開します。

resume dst

1つまたはすべての物理格納先を再開します。

shutdown bkr

メッセージブローカを停止します。

update dst

物理格納先のプロパティを更新します。


オプション

オプション名

簡略名

説明

-b

メッセージブローカのホスト名とポート番号を、「ホスト名:ポート番号」の形式で指定します。

ホスト名だけ指定する場合は、「ホスト名」として指定します。
ポート番号だけ指定する場合は、「:ポート番号」として指定します。
IPv6形式のIPアドレスを角括弧([])で囲んで指定することもできます。指定方法については「使用例」を参照してください。
省略時のホスト名は、「localhost」です。
省略時のポート番号は、「17696」です。

-help

-h

使用法のヘルプを表示します。

-Help

-H

使用法のヘルプ、プロパティリストおよび例を表示します。

-f

ユーザーに実行確認の問合せを行いません。

-u

メッセージブローカの管理者ユーザー名を指定します。
省略時は、インタラクティブな問合せが発生し、管理者ユーザー名の入力が必要となります。

-passfile

パスワードファイル名を絶対パスで指定します。
省略時は、インタラクティブな問合せが発生し、管理者パスワードの入力が必要となります。
パスワードファイルの記述方法については、「パスワードファイルの指定」を参照してください。


戻り値

0: 正常終了
0以外: 異常終了


注意事項

パスワードファイルの指定

(1)パスワードファイル作成
  パスワードファイルには、imq.imqcmd.passwordを使用して以下のように記述します。

imq.imqcmd.password=パスワード

(2)パスワードファイルのエンコード実施

  (1)で作成したパスワードファイルを使用して以下のようにコマンドを実施します。

C:\Interstage\glassfish5\mq\bin\imqusermgr encode -src C:\work\password.txt -target C:\work\password_encoded.txt

/opt/FJSViaps/glassfish5/mq/bin/imqusermgr encode -src /work/password.txt -target /work/password_encoded.txt

エンコードを行っていないパスワードファイルを指定すると[A2016]のWARNINGメッセージが表示されます。
動作としては問題ありません。

なお、指定したパスワードファイルが参照できない場合は、コマンドの実行に失敗します。出力されたエラーメッセージを参照して対処を行ってください。

注意

パスワードファイルを使用してユーザーの認証を行う場合、ユーザーのパスワードにマルチバイト文字を使用したパスワードを指定しないでください。

エンコード実行後、エンコード前のパスワードファイルは削除してください。

パスワードファイルに記述したパスワードを保護するため、テキストエディタで作成したパスワードファイルのアクセス権を「400」に設定してください。

使用例

以下のように実行します。

-bオプションにIPv4アドレス(127.0.0.1)、ポート番号(17696)を指定する場合

C:\Interstage\glassfish5\mq\bin\imqcmd update dst -t q -n mq.sys.dmq -o maxNumMsgs=10000 -b 127.0.0.1:17696
Username: admin
Password:
Updating the Queue destination that has the name:

mq.sys.dmq

with the following updated attributes:

maxNumMsgs    10000

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
127.0.0.1    17696

Are you sure you want to update this destination? (y/n)[n] y

Successfully updated the destination.

/opt/FJSViaps/glassfish5/mq/bin/imqcmd update dst -t q -n mq.sys.dmq -o maxNumMsgs=10000 -b 127.0.0.1:17696
Username: admin
Password:
Updating the Queue destination that has the name:

mq.sys.dmq

with the following updated attributes:

maxNumMsgs    10000

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
127.0.0.1    17696

Are you sure you want to update this destination? (y/n)[n] y

Successfully updated the destination.

-bオプションにIPv6アドレス(::1)、ポート番号(17696)を指定する場合

C:\Interstage\glassfish5\mq\bin\imqcmd update dst -t q -n mq.sys.dmq -o maxNumMsgs=10000 -b [::1]:17696
Username: admin
Password:
Updating the Queue destination that has the name:

mq.sys.dmq

with the following updated attributes:

maxNumMsgs    10000

On the broker specified by:

---------------------
Host     Primary Port
---------------------
[::1]    17696

Are you sure you want to update this destination? (y/n)[n] y

Successfully updated the destination.

/opt/FJSViaps/glassfish5/mq/bin/imqcmd update dst -t q -n mq.sys.dmq -o maxNumMsgs=10000 -b [::1]:17696
Username: admin
Password:
Updating the Queue destination that has the name:

mq.sys.dmq

with the following updated attributes:

maxNumMsgs    10000

On the broker specified by:

---------------------
Host     Primary Port
---------------------
[::1]    17696

Are you sure you want to update this destination? (y/n)[n] y

Successfully updated the destination.
-uオプションと-passfileオプションを指定する場合

管理者ユーザー名とパスワードの入力が省略できます。
また、-fオプションを指定すると、実行確認の問合せも省略できます。

C:\Interstage\glassfish5\mq\bin\imqcmd update dst -t q -n mq.sys.dmq -o maxNumMsgs=10000 -u admin -passfile C:\work\passfile.txt -f
Updating the Queue destination that has the name:

mq.sys.dmq

with the following updated attributes:

maxNumMsgs    10000

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    17696

Successfully updated the destination.

/opt/FJSViaps/glassfish5/mq/bin/imqcmd update dst -t q -n mq.sys.dmq -o maxNumMsgs=10000 -u admin -passfile /work/passfile.txt -f
Updating the Queue destination that has the name:

mq.sys.dmq

with the following updated attributes:

maxNumMsgs    10000

On the broker specified by:

-------------------------
Host         Primary Port
-------------------------
localhost    17696

Successfully updated the destination.