Francisco Batista
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ### Melhorias no gestão de consumo - usage-backend ##### Criacao de uma nova base de dados para o usage [1][infraenviroment] - Criar novas env vars no projeto infra-meuvivoempresas-environments (infra-meuvivoempresas-environments) para contemplar uma nova base de dados para o usage. Observação: criar as estruturas dentro de applications.backend.usage-backend Exemplo: usabe-backend: mongodb: database: "usage" user: "usage" password: "wahqJ8YP8oVjDtqvZHOG" [reference link] https://wikicorp.telefonica.com.br/pages/viewpage.action?pageId=419329814 Replicar a estrtura para Dev, pre, dark e production Tempo: 2h [2][cd][usage][backend] - Criar novas vars no projeto do cd conforme estrutura criada no projeto do infra. os valores default das variaveis deversão ser iguais ao dev no infra Obs. Não esquecer de criar as variaveis de ambiente no arquivo usage-backend-replicaset.yaml Tempo: 2h [3][usage][backend] - Criar variaveis de ambiente nos profile aplication (dev, test e production) Exemplo: application-dev.properties: mongo.database.name=${MONGODB_USAGE_DATABASE:db-usage} quarkus.mongodb.usage-database.connection-string=${MONGODB_USAGE_URL:definir} application-test.properties: mongo.database.name=${MONGODB_USAGE_DATABASE:db-usage} quarkus.mongodb.usage-database.connection-string=${MONGODB_USAGE_URL:definir} application.properties: mongo.database.name=${MONGODB_USAGE_DATABASE} quarkus.mongodb.usage-database.connection-string=${MONGODB_USAGE_URL} Tempo: 1h [4][usage][backend] - criar as estruturas no usage-backend para representar os objetos que consumirão as filas do rabbitMQ - Criar o repository - Realizar testes unitários - Realizar o testes de mutação Tempo: 4h [5][kt] - elaboração do documento técnico Tempo: 2h [6][teste] - realizar testes exploratórios - verificar se o banco será criado juntamente com a collection; - testar se após a inclusão de registros o mongo consegue realizar a exclusão automática após um periodo; Tempo: 3h [7][qa] - liberar para o ambiente de pre Tempo: 1h ======================================================================= ### Criacao de Consumers e Producers no RabbitMQ - PARTE II [0] A&D - refinamento técnico, quebra de tarefas e discussões a respeito [1][usage][backend] - Implementação de Producer da fila de Lines 1. Criar classe Producer que herda da classe RabbitMQProducer e que implementa método publish através de um contrato de interface 2. Criar variáveis no application.properties referente a configuração necessária no Producer 3. Criar método publish recebendo objeto de Response contendo a linha e informações necessárias e o transformando em String utilizando jackson e publicando na devida exchange Tempo: 3h Obs: Realizar os testes unitários e verificar os mutantes Variáveis de ambiente a serem criadas no application.properties, application-dev.properties, application-test.properties: #CONFIGS PARA LINES PRODUCER rabbitmq.usage-lines-exchange-publish=br.com.vivo.usage.topic rabbitmq.usage-lines-routing-key-publish=usage.lines.queue [2][usage][backend] Implementação de Producer da fila de response do WSS: 1. Criar classe Producer que herda da classe RabbitMQProducer e que implementa método publish através de um contrato de interface 2. Criar variáveis no application.properties referente a configuração necessária no Producer 3. Criar método publish recebendo objeto de Response do WSS e o transformando em String utilizando jackson e publicando na devida exchange Obs: Realizar os testes unitários e verificar os mutantes Tempo: 3h #CONFIGS PARA WSS IMPORT LINES CONSUMPTION PRODUCER rabbitmq.usage-import-lines-consumption-response-exchange=br.com.vivo.usage.group.start.import.lines.consumption.topic [3][usage][backend][dependência 1 e 2] - Implementação de Consumer da fila de request do WSS: 1. Criar classe Consumer que herda da classe RabbitMQConsumer e implementa uma interface que herda da interface Consumer e que escutará as mensagens publicadas na fila de request do WSS 2. Adicionar variável no application.properties com a exchange e a queue criada pelo WSS seguindo com o prefixo rabbitmq e utilizando o padrão kebab case 3. Incluir atributos na classe UsageConsumerProperties que representem as variáveis adicionadas no application.properties, utilizando a mesma nomenclatura após o prefixo rabbitmq, no entanto utilizando o padrão camel case. 4. Os novos atributos da classe UsageConsumerProperties devem ser utilizadas para abrir a conexão com a fila de request do WSS na classe consumer criada, através do método start. 5. Criar Command que deve receber o payload da mensagem da fila, fazer uma requisição ao NGIN para obter todas as linhas de um grupo 6. A lista de linhas deve ser iterada, sendo enriquecida com informações necessárias e sendo publicada em uma fila de linhas através de um Producer que será criado paralelamente (tarefa 1) 7. Após isso o Command deverá retornar informações necessárias ao Polling 8. De posse das informações do Polling, o Consumer deve publicar essas informações através de um Producer que será criado paralelamente (tarefa 2) 9. Injeção do Consumer na classe AppLifecycleBean e inclusão nos métodos onStart e onStop Obs: Realizar os testes unitários e verificar os mutantes #CONFIGS PARA WSS IMPORT LINES CONSUMPTION CONSUMER rabbitmq.usage-import-lines-consumption-request-exchange=br.com.vivo.usage.group.start.import.lines.consumption.direct rabbitmq.usage-import-lines-consumption-request-queue=br.com.vivo.usage.group.start.import.lines.consumption.queue.request Tempo: 5h [4][usage][backend] Implementação de Consumer da fila de Lines: 1. Criar classe Consumer que herda da classe RabbitMQConsumer e implementa uma interface que herda da interface Consumer e que escutará as mensagens publicadas na fila de Lines 2. Criar Command para buscar o consumo da linha recebida através da mensagem, além de outras informações como se há algum Evento, status desse Evento, IdMessage desse evento 3. Salvar objeto na collection usage_group_import_status do MongoDB 4. Caso haja algum erro, o objeto deve ser salvo sem o consumo e com o atributo error como true 5. Injeção do Consumer na classe AppLifecycleBean e inclusão nos métodos onStart e onStop Obs: Realizar os testes unitários e verificar os mutantes #CONFIGS PARA LINES CONSUMER rabbitmq.usage-lines-exchange=br.com.vivo.usage.topic rabbitmq.usage-lines-queue=br.com.vivo.usage.lines.queue rabbitmq.usage-lines-routing-key=usage.lines.queue Tempo: 3h [5][usage][backend] Implementação do endpoint de Polling: 1. Criar nova assinatura de endpoint no UsageWebResource, para receber os parâmetros e devolver a resposta da requisição 2. Deve receber os seguintes parâmetros Integer networkNumbersSize, String correlationId, String groupId, String accountId 3. Implementar query no repository que traga registros baseado no correlationId, groupId e accountId 4. Criar Command para realizar a lógica do polling, que consiste em verificar se a quantidade de registros da query realizada na collection é a mesma que o número total de linhas 5. Caso seja a mesma quantidade, a lista deve ser retornada e um atributo hasCompleted deve ser retornado como true 6. Caso contrário, a lista deve ser retornada vazia e o hasCompleted deve ser retornado como false 7. Caso haja algum erro um atributo hasError deve ser retornado como true Obs: Realizar os testes unitários e verificar os mutantes Tempo: 4h [6][testes][exploratorios] - Realizar testes exploratórios - Realizar testes exploratórios utilizando filas do rabbitMQ - coletar evidencias que o mongo está persitindo as informações - validar se o mongo está removendo os registros - validar se o total de documentos está de acordo com o total de linhas do grupo - armazenar evidencias em documento e anexar a tarefa do jira Tempo: [7][testes][backend][componentes] - elaborar testes de componente dos producers e consumers Tempo: 8h [8][testes][backend][componentes] - elaborar testes de componente do endpoint de polling Tempo: 5h [9][kt] - Elaborar o kt da história Tempo: 2h [10][qa] - liberar para qa Tempo: 0,5h

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully