New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ms-rabbit-cliente

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ms-rabbit-cliente

  • 0.0.8
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-91.67%
Maintainers
1
Weekly downloads
 
Created
Source

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Descripcion

Paquete de Conexion para interceptar solicitudes Http y generar broadcast de solicitudes por el servicio de rabbitMQ

Instalacion

Instalacion del paquete

npm i ms-rabbit-cliente

Configuracion

Configuracion de Paquete en el archivo app.module.ts

import {AppModuleRabbitClient} from 'ms-rabbit-cliente'
@Module({
  imports: [
    AppModuleRabbitClient.register(),
  ],
  controllers: [], 
  providers: [],
})
export class AppModule {}

Configuracion de Paquete en el archivo my.montroller.ts

import { DatapassInterceptor } from 'ms-rabbit-cliente'

 @Get('/my-rest-api') 
 @SetMetadata("data-rabbit", {virtualHost:"server_client"}) 
 @UseInterceptors(RabbitInterceptor)
 async myRestApi(@Res({}) res) {
    try {
        const getResponse = await this.appService.myService()
        return getResponse
    } catch (error) {
        return res.status(HttpStatus.BAD_REQUEST).json(error);
    }
 }

Propiedades del decorador @SetMetadata("data-rabbit")

Descripcion de los campos en "data-cache"

PropiedadValorDescripcion
virtualHostString (null)Host Virtual donde creara una conexion, si este no existe lo creara automaticamete campo obligatorio
sendAllBoolean (true)TRUE si se enviara a todos los queues dentro del virtualHost
specifiedClientString (null)Si sendAll se establece en FALSO se debera ingresar de manera obligada el queue unico del cliente

Configuracion en la solicitud HTTP si se utilizara el interceptor

curl --location 'https://my-rest-api.com/rest-api-two?queue="queueUnique"

Uso del Servicio

Se pueden utilizar el servicio

Debe realizar la configuracion de Paquete en su archivo my.service.ts

import { RabbitServiceClient } from 'ms-rabbit-cliente';

@Injectable()
export class AppService {
  constructor(
    private rabbitServiceClient:RabbitServiceClient,
  ){}


  async getRestApiTWo():Promise<Observable<AxiosResponse<any[]>>>{
    try {
        this.rabbitServiceClient.sendDataVirtualHost({virtualHost:"server_client",sendAll:true},"queueUnique")
    } catch (error) {
        throw error
    }
  }
}

Descripcion de los objecto para envio de datos

PropiedadValorDescripcion
virtualHostString (null)Host Virtual donde creara una conexion, si este no existe lo creara automaticamete campo obligatorio
sendAllBoolean (true)TRUE si se enviara a todos los queues dentro del virtualHost
specifiedClientString (null)Si sendAll se establece en FALSO se debera ingresar de manera obligada el queue unico del cliente

queueUnique Se recomienda colocar algun identificador unico de usuario o de conexion del cliente Vue

FAQs

Package last updated on 12 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc