Diabetic retinopathy stands out as one of the highly prevalent causes of vision loss in working people worldwide. In computer vision, deep learning based strategies are seen as a viable solution for efficient diabetic retinopathy detection. We present a UNet-based deep learning architecture for diabetic retinopathy segmentation of blood vessels, exudates, and microaneurysms. Traditional methods often consider the features only from the last convolution unit and discard the remaining features, resulting in low-quality feature maps. However, boundary information plays important role in medical image segmentation. To overcome this, we introduce a skip connection mechanism to concatenate all attributes from each layer. Additionally, we utilize an upsampling layer to aggregate the features at the final sigmoid layer. Finally, we apply channel and spatial attention mechanisms to generate the semantic feature map. Therefore, the proposed approach overcomes the issues of existing methods by incorporating dense skip connection along with channel and spatial attention mechanism which helps to retain the substantial information of image. We tested proposed approach on several publicly available datasets such as IDRiD, DIARETDB1, STARE, ChaseDB1, DRIVE, and HRF datasets. The comparative analysis shows that the proposed approach achieves superior performance, with an average accuracy of 98.10%, average sensitivity of 97.60%, and average specificity of 98.2% for segmentation.