LoginSignup
0
0

More than 1 year has passed since last update.

Nestjsでマイクロサービス①

Last updated at Posted at 2021-12-15

メモ:こちら
を見読みつつそのままでは実装ができなかったので実装しました。

NestJSのMictoservisの項目の実装が足りてなかったので独自で実装しました

Overview

TCPでの通信を行う
いわゆる request-responseモデルであり、応答を待つタイプ

Redisでの実装

Redis のPub/Sub機能を用いて、メッセージングを行う

実装:https://github.com/starcharles/nest-microservice/tree/feature/redis

  1. redisをpassworldなしで動くように起動(調べてください)

  2. server1, server2を起動

エラーが出なければ接続できているので、server2(localhost:3001)に対して
GET http://localhost/notificationをする

うまく行けばserver1で受信できて成功!!!

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0